[node-operator] nodeimage-controller: improve test robustness

Signed-off-by: Malte Poll <mp@edgeless.systems>
This commit is contained in:
Malte Poll 2022-08-15 15:12:10 +02:00 committed by Malte Poll
parent aee432ed6f
commit 23dfc5549b

View File

@ -174,7 +174,10 @@ var _ = Describe("NodeImage controller", func() {
Eventually(func() error {
return k8sClient.Get(ctx, joiningPendingNodeLookupKey, pendingNode)
}).Should(Succeed())
Expect(pendingNode.Status.CSPNodeState).Should(Equal(updatev1alpha1.NodeStateReady))
Eventually(func() updatev1alpha1.CSPNodeState {
k8sClient.Get(ctx, joiningPendingNodeLookupKey, pendingNode)
return pendingNode.Status.CSPNodeState
}).Should(Equal(updatev1alpha1.NodeStateReady))
Eventually(func() int {
if err := k8sClient.Get(ctx, nodeImageLookupKey, nodeImage); err != nil {
return 0