Skip to content

Commit 90b8c87

Browse files
authored
Update gmsa test
Wait for the container to be in Running state before running any command.
1 parent dcbe588 commit 90b8c87

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

test/e2e/windows/gmsa.go

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -68,23 +68,7 @@ var _ = SIGDescribe("[Feature:Windows] [Feature:WindowsGMSA] GMSA [Slow]", func(
6868
}
6969

7070
ginkgo.By("creating a pod with correct GMSA annotations")
71-
f.PodClient().Create(pod)
72-
73-
ginkgo.By("waiting for the pod and its containers to be running")
74-
gomega.Eventually(func() bool {
75-
pod, err := f.PodClient().Get(podName, metav1.GetOptions{})
76-
if err != nil && pod.Status.Phase != corev1.PodRunning {
77-
return false
78-
}
79-
80-
for _, containerStatus := range pod.Status.ContainerStatuses {
81-
if containerStatus.State.Running == nil {
82-
return false
83-
}
84-
}
85-
86-
return true
87-
}, 5*time.Minute, 1*time.Second).Should(gomega.BeTrue())
71+
f.PodClient().CreateSync(pod)
8872

8973
ginkgo.By("checking the domain reported by nltest in the containers")
9074
namespaceOption := fmt.Sprintf("--namespace=%s", f.Namespace.Name)

0 commit comments

Comments
 (0)