Skip to content

Commit

Permalink
added two more cases per code review
Browse files Browse the repository at this point in the history
  • Loading branch information
LiboYu2 committed Oct 31, 2024
1 parent 86305d2 commit c573373
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api/v1/verticadb_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1547,6 +1547,11 @@ var _ = Describe("verticadb_webhook", func() {
Ω(newVdb.validateShutdownSandboxImage(oldVdb, field.ErrorList{})).Should(HaveLen(1))
newVdb.Status.Subclusters[3].Shutdown = false
Ω(newVdb.validateShutdownSandboxImage(oldVdb, field.ErrorList{})).Should(HaveLen(0))
newVdb.Status.Subclusters[0].Shutdown = true
Ω(newVdb.validateShutdownSandboxImage(oldVdb, field.ErrorList{})).Should(HaveLen(0))
newVdb.Spec.Sandboxes[0].Shutdown = false
Ω(newVdb.validateShutdownSandboxImage(oldVdb, field.ErrorList{})).Should(HaveLen(0))

})

It("should not terminate a sandbox whose shutdown field is set", func() {
Expand Down

0 comments on commit c573373

Please sign in to comment.