mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
Update gmsa test
Wait for the container to be in Running state before running any command.
This commit is contained in:
parent
dcbe588f76
commit
90b8c877ed
@ -68,23 +68,7 @@ var _ = SIGDescribe("[Feature:Windows] [Feature:WindowsGMSA] GMSA [Slow]", func(
|
|||||||
}
|
}
|
||||||
|
|
||||||
ginkgo.By("creating a pod with correct GMSA annotations")
|
ginkgo.By("creating a pod with correct GMSA annotations")
|
||||||
f.PodClient().Create(pod)
|
f.PodClient().CreateSync(pod)
|
||||||
|
|
||||||
ginkgo.By("waiting for the pod and its containers to be running")
|
|
||||||
gomega.Eventually(func() bool {
|
|
||||||
pod, err := f.PodClient().Get(podName, metav1.GetOptions{})
|
|
||||||
if err != nil && pod.Status.Phase != corev1.PodRunning {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, containerStatus := range pod.Status.ContainerStatuses {
|
|
||||||
if containerStatus.State.Running == nil {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true
|
|
||||||
}, 5*time.Minute, 1*time.Second).Should(gomega.BeTrue())
|
|
||||||
|
|
||||||
ginkgo.By("checking the domain reported by nltest in the containers")
|
ginkgo.By("checking the domain reported by nltest in the containers")
|
||||||
namespaceOption := fmt.Sprintf("--namespace=%s", f.Namespace.Name)
|
namespaceOption := fmt.Sprintf("--namespace=%s", f.Namespace.Name)
|
||||||
|
Loading…
Reference in New Issue
Block a user