@@ -61,7 +61,6 @@ func TestControllerMembership(t *testing.T) {
6161 return node .Labels , err
6262 }).Should (HaveKey (bootcv1alpha1 .LabelManaged ))
6363
64- // Verify daemon pod schedules on the managed node and reaches Running.
6564 g .Eventually (func () ([]corev1.Pod , error ) {
6665 var pods corev1.PodList
6766 err := env .Client .List (ctx , & pods ,
@@ -72,8 +71,20 @@ func TestControllerMembership(t *testing.T) {
7271 },
7372 )
7473 return pods .Items , err
75- }).Should (ConsistOf (And (
74+ }).WithTimeout ( 3 * time . Minute ). Should (ConsistOf (And (
7675 HaveField ("Spec.NodeName" , nodeName ),
7776 HaveField ("Status.Phase" , corev1 .PodRunning ),
7877 )), "expected exactly one running daemon pod on %s" , nodeName )
78+
79+ g .Eventually (func (g Gomega ) {
80+ g .Expect (env .Client .Get (ctx , client.ObjectKey {Name : nodeName }, & bn )).To (Succeed ())
81+ g .Expect (bn .Status .Booted ).NotTo (BeNil (), "expected booted status to be populated" )
82+ g .Expect (bn .Status .Booted .Image ).NotTo (BeEmpty (), "expected booted image to be non-empty" )
83+ g .Expect (bn .Status .Booted .ImageDigest ).NotTo (BeEmpty (), "expected booted imageDigest to be non-empty" )
84+ g .Expect (bn .Status .Conditions ).To (ContainElement (And (
85+ HaveField ("Type" , bootcv1alpha1 .NodeIdle ),
86+ HaveField ("Status" , metav1 .ConditionTrue ),
87+ HaveField ("Reason" , bootcv1alpha1 .NodeReasonIdle ),
88+ )))
89+ }).WithTimeout (3 * time .Minute ).Should (Succeed ())
7990}
0 commit comments