Skip to content

Commit

Permalink
Variable name collides with builtin function
Browse files Browse the repository at this point in the history
  • Loading branch information
ChunyiLyu committed Mar 25, 2021
1 parent cf21b5d commit b59a5b4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions api/v1alpha2/user_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ var _ = Describe("user webhook", func() {
}

It("does not allow updates on RabbitmqClusterReference", func() {
new := user.DeepCopy()
new.Spec.RabbitmqClusterReference = RabbitmqClusterReference{
Name: "new-cluster",
newUser := user.DeepCopy()
newUser.Spec.RabbitmqClusterReference = RabbitmqClusterReference{
Name: "newUser-cluster",
}
Expect(apierrors.IsForbidden(new.ValidateUpdate(&user))).To(BeTrue())
Expect(apierrors.IsForbidden(newUser.ValidateUpdate(&user))).To(BeTrue())
})

It("allows update on tags", func() {
new := user.DeepCopy()
new.Spec.Tags = []UserTag{"monitoring"}
Expect(new.ValidateUpdate(&user)).To(Succeed())
newUser := user.DeepCopy()
newUser.Spec.Tags = []UserTag{"monitoring"}
Expect(newUser.ValidateUpdate(&user)).To(Succeed())
})
})

0 comments on commit b59a5b4

Please sign in to comment.