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

feat: improve e2e tests #105

Merged
merged 1 commit into from
Aug 8, 2024
Merged

feat: improve e2e tests #105

merged 1 commit into from
Aug 8, 2024

Conversation

csatib02
Copy link
Member

@csatib02 csatib02 commented Jun 30, 2024

Overview

  • I added a function that can retrieve the logs of containers, and since we log the secrets already, it proves to be a great opportunity to verify the success of secret injection.
  • I found an issue on the old webhook repo Improve e2e tests vault-secrets-webhook#6.
  • I don't believe it would be useful to check the existence of Secret-Init injected into the resource, since the tests would fail if that did not happen. Moreover, executing Secret-Init again is not something that we encourage or recommend doing, so in my opinion, it falls far from a real-world use case.

As a result of these changes:

  1. Injection is tested in case of all supported resource types:
  • Config Map
  • Secret
  • Pod
  • CRD (deploying a Vault CR creates admission review requests.)
  1. Successful secret injection is verified for pods.

Fixes: bank-vaults/vault-secrets-webhook#6

@csatib02 csatib02 requested a review from a team as a code owner June 30, 2024 11:39
@csatib02 csatib02 requested review from sagikazarmark and removed request for a team June 30, 2024 11:39
@github-actions github-actions bot added the size/M Denotes a PR that changes 100-499 lines label Jun 30, 2024
@csatib02 csatib02 self-assigned this Jun 30, 2024
@csatib02 csatib02 added kind/test Categorizes issue or PR as related to testing. area/test kind/enhancement Categorizes issue or PR as related to an improvement. labels Jun 30, 2024
@csatib02 csatib02 requested review from ramizpolic and akijakya June 30, 2024 11:40
@csatib02 csatib02 marked this pull request as draft July 10, 2024 13:18
Signed-off-by: Bence Csati <[email protected]>

feat: improve e2e tests

Signed-off-by: Bence Csati <[email protected]>
@csatib02 csatib02 force-pushed the feat/improve-e2e-tests branch from 0985b07 to 751df82 Compare July 25, 2024 10:01
@csatib02 csatib02 marked this pull request as ready for review July 25, 2024 10:04
@csatib02 csatib02 merged commit cf1646b into main Aug 8, 2024
32 checks passed
@csatib02 csatib02 deleted the feat/improve-e2e-tests branch August 8, 2024 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/test kind/enhancement Categorizes issue or PR as related to an improvement. kind/test Categorizes issue or PR as related to testing. size/M Denotes a PR that changes 100-499 lines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve e2e tests
2 participants