Skip to content

e2e: add rollback, pause/resume, and non-existing image tests - #115

Open
ptalgulk01 wants to merge 1 commit into
bootc-dev:mainfrom
ptalgulk01:e2e-passing-tests
Open

e2e: add rollback, pause/resume, and non-existing image tests#115
ptalgulk01 wants to merge 1 commit into
bootc-dev:mainfrom
ptalgulk01:e2e-passing-tests

Conversation

@ptalgulk01

Copy link
Copy Markdown
Collaborator

Fixes #69 (items 1, 2, 3) : Add three new e2e test scenarios from #69:

  • Rollback (item 1): Extend TestUpdateReboot with phases 7-8 that roll back to the original image and verify the node returns to Idle with the original digest
  • Pause/Resume (item 2): Add TestPauseResume that starts an update with paused=true, verifies the node stages but does not reboot, then resumes and verifies the update completes
  • Non-existing image (item 3): Add TestNonExistingImage that updates to a corrupted digest and verifies the node enters Degraded state with Reason=Error while remaining booted on the original image

All three tests pass against a bink cluster.

Test plan

  • TestControllerMembership — PASS (pre-existing)
  • TestUpdateReboot (with rollback) — PASS
  • TestTagResolution — PASS (pre-existing)
  • TestPauseResume — PASS
  • TestNonExistingImage — PASS

@ptalgulk01

Copy link
Copy Markdown
Collaborator Author

cc @alicefr @jlebon can ptal?

Comment thread test/e2e/bootcnode_test.go

@jlebon jlebon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this!

Comment thread test/e2e/bootcnode_test.go Outdated
Comment thread test/e2e/bootcnode_test.go
Comment thread test/e2e/bootcnode_test.go Outdated
Comment thread test/e2e/bootcnode_test.go Outdated

t.Logf("Node %q staged update image (paused, not rebooted)", nodeName)

// Phase 4: Change the target back to the original image while still

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not very different from TestPauseResume. Not quite what I had in mind for #69 (comment). Instead we do something like:

  • provision two nodes (let's say A and B)
  • set the new updated image
  • wait for node A to be Rebooting
  • immediately switch the target image to another updated image
  • wait until both node A and node B eventually are running the updated image
  • verify that node B did not incur an additional reboot into the first update image (e.g. check journalctl --list-boots perhaps?)

@ptalgulk01 ptalgulk01 Jul 28, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

immediately switch the target image to another updated image

here you mean to update the node A when it is rebooting to new image already we have patched to other new image?
And keep node B as it is

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

immediately switch the target image to another updated image

here you mean to update the node A when it is rebooting to new image already we have patched to other new image? And keep node B as it is

I mean changing the pool targetImage to another image. We don't mutate the nodes directly. Node A will reboot into the wrong image, which is fine and expected, but it should then realize that it's not in sync and immediately restage and reboot again. Node B should be able to avoid that reboot and directly stage the new image (abandoning the staged deployment it already had for the previous targetImage).

Comment thread test/e2e/bootcnode_test.go
Comment thread test/e2e/bootcnode_test.go Outdated
Comment thread test/e2e/bootcnode_test.go Outdated
@ptalgulk01

Copy link
Copy Markdown
Collaborator Author

Changes added:

  • Converted all new Eventually callbacks to func() (T, error) pattern per REVIEW_GOLANG.md
  • Moved t.Cleanup after RetagImage in TestTagResolution
  • Unique pool names per test (bnp-pause, bnp-midroll, bnp-noimg)
  • Added g.Consistently (10s) to verify node stays Staged while paused
  • Hardcoded fake digest in TestNonExistingImage
  • Added condition message substring assertion ("stage failed")
  • Replaced Staged != nil guard with g.Expect(bn.Status.Staged).To(BeNil())
  • TestMidRolloutImageChange: waiting for clarification on the 2-node design

Signed-off-by: Prachiti Talgulkar <ptalgulk01@users.noreply.github.com>
@jlebon

jlebon commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Looks sane overall. If you want you can drop the TestMidRolloutImageChange test from this PR and we can get it in, and then add that test in separately (though perhaps then it shouldn't be marked as closing #69).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

E2e test planning

2 participants