Skip to content

Commit

Permalink
add k8s test condition
Browse files Browse the repository at this point in the history
  • Loading branch information
huhouhua committed Oct 23, 2023
1 parent 1ddfdf7 commit 8c88bfb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/ArgoCD.Client.Test/Utilities/ArgoCDKubernetesFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ private async Task ApplyAsync(IList<object> objects)
@namespace = kubernetesObj.Namespace();
fieldSelector = $"{fieldSelector},metadata.namespace={kubernetesObj.Namespace()}";
}

var namespaceList = await kubernetes.CoreV1.ListNamespaceAsync(null,null,$"metadata.namespace={@namespace}");
if (namespaceList.Items.Any())
{
break;
}
switch (kubernetesObj.Kind)
{
case V1CustomResourceDefinition.KubeKind:
Expand Down

0 comments on commit 8c88bfb

Please sign in to comment.