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

Migrate e2e tests for RabbitMQ to Go. #3428

Merged
merged 2 commits into from
Jul 27, 2022
Merged

Conversation

v-shenoy
Copy link
Contributor

Signed-off-by: Vighnesh Shenoy [email protected]

Provide a description of what has been changed

Checklist

  • Commits are signed with Developer Certificate of Origin (DCO - learn more)
  • Tests have been added

Fixes #3249

Relates to #2737

@v-shenoy v-shenoy requested a review from a team as a code owner July 26, 2022 22:39
@v-shenoy
Copy link
Contributor Author

v-shenoy commented Jul 26, 2022

/run-e2e rabbitmq
Update: You can check the progress here

Copy link
Member

@zroubalik zroubalik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, just a nit: I would move all test .go files into one package (rabbitmq) together with rabbitmq_helper.go.
I don't think we need to create a separate package for each one, or is there any reason?

Also, do you think that you can add activation for this scaler (a separate PR is fine)?

Thanks

@v-shenoy
Copy link
Contributor Author

v-shenoy commented Jul 27, 2022

Looking good, just a nit: I would move all test .go files into one package (rabbitmq) together with rabbitmq_helper.go. I don't think we need to create a separate package for each one, or is there any reason?

The only reason I have them in a separate package is because each test has variables like testNamespace, scaledObjectName. If they're in the same package they conflict with one another (this is also why actually each test is in its own package, ideally, I would want to have all of them under scalers_go directly)

The solution is to have them use names like testNamespaceHTTP or testNamespaceAMQP etc but I don't particularly like that solution.

@v-shenoy
Copy link
Contributor Author

Also, do you think that you can add activation for this scaler (a separate PR is fine)?

Thanks

This is already being done in #2831. I didn't want to duplicate the work.

@zroubalik
Copy link
Member

zroubalik commented Jul 27, 2022

Looking good, just a nit: I would move all test .go files into one package (rabbitmq) together with rabbitmq_helper.go. I don't think we need to create a separate package for each one, or is there any reason?

The only reason I have them in a separate package is because each test has variables like testNamespace, scaledObjectName. If they're in the same package they conflict with one another (this is also why actually each test is in its own package, ideally, I would want to have all of them under scalers_go directly)

The solution is to have them use names like testNamespaceHTTP or testNamespaceAMQP etc but I don't particularly like that solution.

Hm, so can we put all these packages under rabbitmq package? I'd like to have all tests related to one scaler in one package.

scalers_go/rabbitmq/rabbitmq_helper.go
scalers_go/rabbitmq/rabbitmq_queue_amqp/rabbitmq_queue_amqp_test.go
scalers_go/rabbitmq/rabbitmq_queue_http/rabbitmq_queue_http_test.go
scalers_go/rabbitmq/rabbitmq_...

@v-shenoy
Copy link
Contributor Author

Looking good, just a nit: I would move all test .go files into one package (rabbitmq) together with rabbitmq_helper.go. I don't think we need to create a separate package for each one, or is there any reason?

The only reason I have them in a separate package is because each test has variables like testNamespace, scaledObjectName. If they're in the same package they conflict with one another (this is also why actually each test is in its own package, ideally, I would want to have all of them under scalers_go directly)
The solution is to have them use names like testNamespaceHTTP or testNamespaceAMQP etc but I don't particularly like that solution.

Hm, so can we put all these packages under rabbitmq package? I'd like to have all tests related to one scaler in one package.

scalers_go/rabbitmq/rabbitmq_helper.go
scalers_go/rabbitmq/rabbitmq_queue_amqp/rabbitmq_queue_amqp_test.go
scalers_go/rabbitmq/rabbitmq_queue_http/rabbitmq_queue_http_test.go
scalers_go/rabbitmq/rabbitmq_...

Yeah, we can. Point to note, we haven't done this for other scalers having multiple tests (such as service bus, or external scaler. Do those need to be changed as well, or it's only because RMQ has so many?

Signed-off-by: Vighnesh Shenoy <[email protected]>
@v-shenoy
Copy link
Contributor Author

v-shenoy commented Jul 27, 2022

/run-e2e rabbitmq
Update: You can check the progress here

@zroubalik
Copy link
Member

Yeah, we can. Point to note, we haven't done this for other scalers having multiple tests (such as service bus, or external scaler. Do those need to be changed as well, or it's only because RMQ has so many?

You are right. We've just discussed this with @JorTurFer and have agreed that we should group all relevant scaler families. So for example all AWS under aws, Azure under azure etc.

@zroubalik zroubalik merged commit ad458f1 into kedacore:main Jul 27, 2022
@v-shenoy v-shenoy deleted the rmq-e2e branch July 27, 2022 11:28
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 this pull request may close these issues.

Migrate e2e test for RabbitMQ to Go
3 participants