-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from huhouhua/dev
Dev
- Loading branch information
Showing
4 changed files
with
45 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 0 additions & 20 deletions
20
test/ArgoCD.Client.Test/Utilities/ArgoCDContainerFixture.cs
This file was deleted.
Oops, something went wrong.
38 changes: 38 additions & 0 deletions
38
test/ArgoCD.Client.Test/Utilities/ArgoCDKubernetesFixture.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using k8s; | ||
|
||
namespace ArgoCD.Client.Test.Utilities | ||
{ | ||
internal class ArgoCDKubernetesFixture : IAsyncLifetime | ||
{ | ||
public static string Token { get; private set; } | ||
public static string ArgoCDHost { get; private set; } | ||
private Kubernetes kubernetes; | ||
|
||
|
||
public async Task InitializeAsync() | ||
{ | ||
await StartKubernetesAsync(); | ||
|
||
} | ||
|
||
public Task DisposeAsync() | ||
{ | ||
|
||
kubernetes?.Dispose(); | ||
return Task.CompletedTask; | ||
|
||
} | ||
private async Task StartKubernetesAsync() | ||
{ | ||
var config = KubernetesClientConfiguration.BuildConfigFromConfigFile(Environment.GetEnvironmentVariable("KUBECONFIG")); | ||
kubernetes = new Kubernetes(config); | ||
|
||
await Task.CompletedTask; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters