Skip to content

Commit

Permalink
fix flaky security group test (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
dergeberl authored Jun 14, 2023
1 parent 9465fba commit 14e6eab
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,8 @@ var _ = Describe("loadbalancer controller", Serial, Ordered, func() {
}
})

var hashInital string

It("should create matching security group rules", func() {
By("creating default rules")
hopefully(lbNN, func(g Gomega, act LB) error {
Expand Down Expand Up @@ -368,6 +370,9 @@ var _ = Describe("loadbalancer controller", Serial, Ordered, func() {
g.Expect(err).To(Succeed())
g.Expect(len(prts)).To(Equal(1))

g.Expect(act.Status.OpenstackReconcileHash).ToNot(BeNil())
hashInital = *act.Status.OpenstackReconcileHash

return nil
})

Expand All @@ -382,6 +387,8 @@ var _ = Describe("loadbalancer controller", Serial, Ordered, func() {
var hashBefore string

hopefully(lbNN, func(g Gomega, act LB) error {
g.Expect(act.Status.OpenstackReconcileHash).ToNot(BeNil())
g.Expect(*act.Status.OpenstackReconcileHash).ToNot(Equal(hashInital))
rls, err := client.RuleClientObj.List(ctx, rules.ListOpts{
SecGroupID: *act.Status.SecurityGroupID,
})
Expand Down

0 comments on commit 14e6eab

Please sign in to comment.