Skip to content

Commit e68672b

Browse files
alicefrHarshwardhanPatil07
authored andcommitted
e2e: check Booted.Image instead of ImageDigest in pull secret test
With remote registries the manifest digest and content digest can differ. Assert on the full image ref which carries the manifest digest rather than the locally resolved content digest. Assisted-by: AI Signed-off-by: Alice Frosi <afrosi@redhat.com>
1 parent 5e87ccc commit e68672b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎test/e2e/bootcnode_test.go‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,14 +883,17 @@ func TestPullSecretAuth(t *testing.T) {
883883
t.Logf("BootcNode %q has pullSecretRef set", nodeName)
884884

885885
// Wait for the node to stage and reboot into the update image.
886+
// Check Booted.Image (the full ref with manifest digest) rather
887+
// than Booted.ImageDigest (the content digest) because they can
888+
// differ with remote registries.
886889
g.Eventually(func() (bootcv1alpha1.BootcNodeStatus, error) {
887890
var bn bootcv1alpha1.BootcNode
888891
err := env.Client.Get(ctx, client.ObjectKey{Name: nodeName}, &bn)
889892
return bn.Status, err
890893
}).WithTimeout(5 * time.Minute).Should(And(
891894
HaveField("Booted", And(
892895
Not(BeNil()),
893-
HaveField("ImageDigest", Equal(digest)),
896+
HaveField("Image", Equal(authImageRef)),
894897
)),
895898
HaveField("Conditions", ContainElement(And(
896899
HaveField("Type", bootcv1alpha1.NodeIdle),

0 commit comments

Comments
 (0)