-
Notifications
You must be signed in to change notification settings - Fork 290
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 e2e test for executing kubectl command on forbidden verbs and resources #350
Comments
@PrasadG193 Can You assign me on this one as well |
Sure! |
Hi @PrasadG193 all i have to do is add one test case with a forbidden verb and a resource, right? |
Yes, that should suffice, we already have test coverage for command with allowed verbs/resources |
@PrasadG193 I'm adding 2 test cases one with a forbidden verb and forbidden resource, and another one with allowed verb and a forbidden resource. is that fine? |
Sounds good. Thanks, @anoopmsivadas |
##### ISSUE TYPE <!--- Pick one below and delete the rest: --> - Bug fix Pull Request ##### SUMMARY <!--- Describe the change, including rationale and design decisions --> Added a e2e test kubectl command with forbidden verb and forbidden resource. Another one for kubctl command with allowed verb and forbidden resource <!--- If you are fixing an existing issue, please include "Fixes #nnn" in your PR comment; and describe briefly what the change does. --> <!--- Please list dependencies added with your change also --> Fixes #350
Is your feature request related to a problem? Please describe.
Missing kubectl command test coverage for negative test-cases
Describe the solution you'd like
BotKube can be configured to allow access to specific kubectl commands only - https://github.com/infracloudio/botkube/blob/develop/test/resource_config.yaml#L224
Add a test case to execute kubectl command on a forbidden resource and a verb.
Add the test cases in the table-driven test map https://github.com/infracloudio/botkube/blob/develop/test/e2e/command/kubectl.go#L46
The text was updated successfully, but these errors were encountered: