Skip to content

Refactor configmap tests with common RabbitmqCluster and then modify properties as we need. #464

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

Closed
ablease opened this issue Nov 12, 2020 · 0 comments · Fixed by #478
Closed

Comments

@ablease
Copy link
Contributor

ablease commented Nov 12, 2020

Similar to the stateful set tests were we have a common RabbitmqCluster generator. We could do something like this in the configmap tests too.

Neat pick: perhaps we can use generateRabbitmqCluster() and modify only the bits an pieces we want to test?

func generateRabbitmqCluster() rabbitmqv1beta1.RabbitmqCluster {
storage := k8sresource.MustParse("10Gi")
return rabbitmqv1beta1.RabbitmqCluster{
ObjectMeta: v1.ObjectMeta{
Name: "foo",
Namespace: "foo-namespace",
},
Spec: rabbitmqv1beta1.RabbitmqClusterSpec{

Something in the lines of:

instance = generateRabbitmqCluster()
instance.spec.ObjectMeta.Name = "rabbit-tls"
instance.spec.TLS.SecretName = "a-secret"
instance.spec.Rabbitmq.AdditionalPlugins = []rabbitmqv1beta1.Plugin{ ... }

Originally posted by @Zerpet in #451 (comment)

@ablease ablease changed the title Refactor configmap tests to create a common RabbitmqCluster and then modify properties as we need. Refactor configmap tests with common RabbitmqCluster and then modify properties as we need. Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant