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

Add BDD and unit testcases #2

Open
rahulchheda opened this issue May 5, 2020 · 5 comments
Open

Add BDD and unit testcases #2

rahulchheda opened this issue May 5, 2020 · 5 comments
Labels
good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed up for grabs

Comments

@rahulchheda
Copy link
Member

rahulchheda commented May 5, 2020

Needed to build some BDD and unit testcases for admission webhook.

Tracking this here: litmuschaos/litmus#2182

@rahulchheda rahulchheda added good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed up for grabs labels Oct 4, 2020
@Abhishek-kumar09
Copy link

Abhishek-kumar09 commented Oct 6, 2020

@rahulchheda Can you help with getting started with this issue.

@rahulchheda
Copy link
Member Author

Hey @Abhishek-kumar09, sorry for the delay. So, we need to create unit tests for each of the file which is easy to do if we can leverage the use of https://godoc.org/k8s.io/client-go/kubernetes/fake. Mainly we focus on the file webhook.go which is responsible for the validation. The steps we perform for creating a Validation Webhook should be done using Fake Client, and then testcases (or choasengines and the resources it refers) should be created to check the behaviour of Admission Controllers.

@christopherfriedrich
Copy link
Member

@rahulchheda when adding the copyright & license info to the test file should i use 2020 or 2019 as year?

@rahulchheda
Copy link
Member Author

I think 2019 would be good.
WDYT @ksatchit ?

@sagnik3788
Copy link

@rahulchheda, can I take this issue if it hasn’t been completed ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed up for grabs
Projects
None yet
Development

No branches or pull requests

4 participants