Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix flaky security group test #184

Merged
merged 1 commit into from
Jun 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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