Skip to content

Commit ffe8a0d

Browse files
committed
Remove redundent and wrong assertion
- the expect assertion on length of imagePullSecrets is in an eventually but not the returned result, which means that the 3 seconds timeout does not apply and when failed at the first iteration the assertion will just fail. While waiting for the statefulSet to update, this could be very flaky on a bad day - the assertion itself is also redundent, as "ConsistOf" is an exact matcher so the length is asserted already.
1 parent eee6aba commit ffe8a0d

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

controllers/rabbitmqcluster_controller_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,6 @@ var _ = Describe("RabbitmqClusterController", func() {
716716
Eventually(func() []corev1.LocalObjectReference {
717717
stsName := cluster.ChildResourceName("server")
718718
sts, _ := clientSet.AppsV1().StatefulSets(cluster.Namespace).Get(ctx, stsName, metav1.GetOptions{})
719-
Expect(len(sts.Spec.Template.Spec.ImagePullSecrets)).To(Equal(1))
720719
return sts.Spec.Template.Spec.ImagePullSecrets
721720
}, 3).Should(ConsistOf(corev1.LocalObjectReference{Name: "my-new-secret"}))
722721
})

0 commit comments

Comments
 (0)