Skip to content

Commit

Permalink
Add test for empty bastion
Browse files Browse the repository at this point in the history
  • Loading branch information
hebelsan committed Sep 3, 2024
1 parent 5b68661 commit 268cdf7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/controller/bastion/vmdetails_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ var _ = Describe("Bastion VM Details", func() {
Expect(details).To(DeepEqual(desired))
})

It("should succeed with empty bastion section", func() {
spec.Bastion = &v1beta1.Bastion{}
details, err := bastion.DetermineVmDetails(spec)
Expect(err).NotTo(HaveOccurred())
Expect(details).To(DeepEqual(desired))
})

It("should succeed without setting bastion section", func() {
spec.Bastion = nil
details, err := bastion.DetermineVmDetails(spec)
Expand Down

0 comments on commit 268cdf7

Please sign in to comment.