Skip to content

Commit

Permalink
lca: add negative test for patching the stage from prep to rollback. (#…
Browse files Browse the repository at this point in the history
…50)

Signed-off-by: Alexander Chuzhoy <[email protected]>
  • Loading branch information
achuzhoy authored Jun 18, 2024
1 parent afc4af0 commit 5a82ae5
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,24 @@ var _ = Describe(
"error: ibu seedimage updated with wrong next stage")

})

It("fails because from Prep it's not possible to move to Rollback stage", reportxml.ID("71740"), func() {

By("Setting the IBU stage to Prep")

_, err := ibu.WithStage("Prep").Update()
Expect(err).NotTo(HaveOccurred(), "error setting ibu to Prep stage")

By("Pull the imagebasedupgrade from the cluster")

ibu, err = lca.PullImageBasedUpgrade(APIClient)
Expect(err).NotTo(HaveOccurred(), "error pulling imagebasedupgrade resource")

By("Setting the IBU stage to Rollback")

_, err = ibu.WithStage("Rollback").Update()
Expect(err.Error()).To(ContainSubstring("the stage transition is not permitted"),
"error: ibu seedimage updated with wrong next stage")

})
})

0 comments on commit 5a82ae5

Please sign in to comment.