Skip to content

Commit

Permalink
Remove ineffective test
Browse files Browse the repository at this point in the history
This test became ineffective after #1735. We want to enable Web
MQTT/STOMP TLS regardless of whether a CA bundle certificate is
provided. This test was asserting that we enable web stomp/mqqt tls when
the CA bundle is set; however, by not setting the CA bundle, the test
passes anyway. This is not correct, making the test ineffective.
  • Loading branch information
Zerpet committed Oct 11, 2024
1 parent aa72d5d commit ba02159
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions internal/resource/statefulset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -621,28 +621,6 @@ var _ = Describe("StatefulSet", func() {
}))
})

When("Mutual TLS (same secret) is enabled", func() {
It("opens tls ports when rabbitmq_web_mqtt and rabbitmq_web_stomp are configured", func() {
instance.Spec.TLS.SecretName = "tls-secret"
instance.Spec.TLS.CaSecretName = "tls-secret"
instance.Spec.Rabbitmq.AdditionalPlugins = []rabbitmqv1beta1.Plugin{"rabbitmq_web_mqtt", "rabbitmq_web_stomp"}
Expect(stsBuilder.Update(statefulSet)).To(Succeed())

rabbitmqContainerSpec := extractContainer(statefulSet.Spec.Template.Spec.Containers, "rabbitmq")

Expect(rabbitmqContainerSpec.Ports).To(ContainElements([]corev1.ContainerPort{
{
Name: "web-mqtt-tls",
ContainerPort: 15676,
},
{
Name: "web-stomp-tls",
ContainerPort: 15673,
},
}))
})
})

When("Mutual TLS (different secret) is enabled", func() {
It("adds the CA cert secret to tls project volume", func() {
instance.Spec.TLS.SecretName = "tls-secret"
Expand Down

0 comments on commit ba02159

Please sign in to comment.