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 to Go #2737

Closed
48 tasks done
tomkerkhove opened this issue Mar 12, 2022 · 29 comments · Fixed by #3505
Closed
48 tasks done

Migrate e2e tests to Go #2737

tomkerkhove opened this issue Mar 12, 2022 · 29 comments · Fixed by #3505
Labels
help wanted Looking for support from community stale-bot-ignore All issues that should not be automatically closed by our stale bot

Comments

@tomkerkhove
Copy link
Member

tomkerkhove commented Mar 12, 2022

Migrate e2e tests to Go instead of typescript to standardize one one language.

We should use a phased approach where we migrate one scaler and run the new approach next to the current one to verify the setup.

New scalers should be in Go and then gradually migrate old tests over.

@tomkerkhove
Copy link
Member Author

Thoughts @kedacore/keda-core-contributors?

@JorTurFer
Copy link
Member

JorTurFer commented Mar 12, 2022

There is not an icon to reflect how much I agree with this proposal 😁😁

@stale
Copy link

stale bot commented May 11, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale All issues that are marked as stale due to inactivity label May 11, 2022
@JorTurFer JorTurFer added the stale-bot-ignore All issues that should not be automatically closed by our stale bot label May 11, 2022
@stale stale bot removed the stale All issues that are marked as stale due to inactivity label May 11, 2022
@v-shenoy
Copy link
Contributor

Bumping this issue. I think this switch would be highly beneficial and work on it should get started. There's no need for a project that's written entirely in Go, to have its e2e tests written in TypeScript. The more we delay this, the tougher it's going to get with more scalers and their typescript tests being added.

@tomkerkhove
Copy link
Member Author

💯, we just need to find somebody who wants to go through it 😅

@v-shenoy
Copy link
Contributor

v-shenoy commented May 11, 2022

First of all, there's the discussion of which Go testing framework to be used, and with which assertion framework. Currently, there's a bit of inconsistency with some unit tests using testify/assert, while some are using another, while some are using manual comparisons with the default testing framework.

Once the decision is finalized, a little bit of work would also be required to bring existing tests to parity.

As for the e2e tests themselves, we should probably have an umbrella thread asking for Go tests similar to the one already existing, and start accepting new tests only in Go.

@v-shenoy
Copy link
Contributor

v-shenoy commented May 11, 2022

@kedacore/keda-core-contributors I am willing to start this off with e2e tests for the Azure scalers. I was considering just using testify for its assertion framework and maybe suite, and nothing more.

@zroubalik
Copy link
Member

@v-shenoy that would be great! Please sync with @JorTurFer.

It doesn't have to be over complex, but we should have some general library with wait/deploy/watch/log methods.

@JorTurFer
Copy link
Member

I did some tries, but nothing really important, if you are willing to contribute with this, I'll not be who blocks you xD
My only concern/request is that please, use a tool/framework that can be debuggable please 🙏 .
Developing e2e test with npx ava printing logs is a pain

@v-shenoy
Copy link
Contributor

v-shenoy commented May 11, 2022

I'll send a draft PR with one test tomorrow, for reference.

@tomkerkhove
Copy link
Member Author

Thanks a ton @v-shenoy!

@tomkerkhove
Copy link
Member Author

Please don't forget to update the contribution guide as well;

@v-shenoy
Copy link
Contributor

v-shenoy commented Jun 13, 2022

Please don't forget to update the contribution guide as well;

tests/README has already been updated with basic guide about tests in Go.

@tomkerkhove
Copy link
Member Author

I was thinking about https://github.com/kedacore/keda/blob/main/CONTRIBUTING.md#contributing-scalers but that just points to the above README so we are good to go.

Thanks.

@v-shenoy
Copy link
Contributor

Halfway there, phew!

@tomkerkhove
Copy link
Member Author

Nice progress on this!

@goku321
Copy link
Contributor

goku321 commented Aug 2, 2022

I can take care of Redis related tests(if no one is working on them) once I'm done with NATS JetStream scaler

@JorTurFer
Copy link
Member

JorTurFer commented Aug 2, 2022

Redis is almost done, I have the PR opened
😁

@JorTurFer
Copy link
Member

@goku321 , do you know about Redis Stream in general? Could I ask if you could answer this?

@v-shenoy
Copy link
Contributor

v-shenoy commented Aug 5, 2022

Took a while, but we got there :)

@tomkerkhove
Copy link
Member Author

Congrats and thanks to everyone who has contributed to this! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Looking for support from community stale-bot-ignore All issues that should not be automatically closed by our stale bot
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

6 participants