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: add push secret to e2e tests #3017
feat: add push secret to e2e tests #3017
Conversation
3d02034
to
0f9bfab
Compare
76dbf6a
to
f032c5b
Compare
ecc561f
to
7aa2f03
Compare
7aa2f03
to
c798119
Compare
Go home Sonar, you're drunk.
|
Hm, I don't have a nice way of verifying the outcome 🤔 |
I could create the whole flow. Create an external secret that pulls the secret the push secret just created. And check the value is the templates value. Since in the e2e test I don't have direct access to the fake provider. But that's at least a nice e2e flow I guess. |
It's wooorrrkiiingg!! 🎉 🎉 |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left one minor comment, but overall I think this looks like a good place to start with 👍
9683171
to
b062162
Compare
Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
b062162
to
4202927
Compare
Quality Gate passedIssues Measures |
awesome! |
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [external-secrets](https://togithub.com/external-secrets/external-secrets) | patch | `0.9.12` -> `0.9.13` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>external-secrets/external-secrets (external-secrets)</summary> ### [`v0.9.13`](https://togithub.com/external-secrets/external-secrets/releases/tag/v0.9.13) [Compare Source](https://togithub.com/external-secrets/external-secrets/compare/v0.9.12...v0.9.13) Image: `ghcr.io/external-secrets/external-secrets:v0.9.13` Image: `ghcr.io/external-secrets/external-secrets:v0.9.13-ubi` Image: `ghcr.io/external-secrets/external-secrets:v0.9.13-ubi-boringssl` #### What's Changed - bump 0.9.12 by [@​rogertuma](https://togithub.com/rogertuma) in [external-secrets/external-secrets#3125 - temporarily removing ossf checks for helm release by [@​gusfcarvalho](https://togithub.com/gusfcarvalho) in [external-secrets/external-secrets#3128 - chore(deps): bump aquasecurity/trivy-action from [`f3d9851`](https://togithub.com/external-secrets/external-secrets/commit/f3d98514b056d8c71a3552e8328c225bc7f6f353) to [`84384bd`](https://togithub.com/external-secrets/external-secrets/commit/84384bd6e777ef152729993b8145ea352e9dd3ef) by [@​dependabot](https://togithub.com/dependabot) in [external-secrets/external-secrets#3142 - chore(deps): bump ubi8/ubi-minimal from `c9c8f91` to `6825946` by [@​dependabot](https://togithub.com/dependabot) in [external-secrets/external-secrets#3137 - feat: add push secret to e2e tests by [@​Skarlso](https://togithub.com/Skarlso) in [external-secrets/external-secrets#3017 - Implementation of Chef External Secrets Provider by [@​sourav977](https://togithub.com/sourav977) in [external-secrets/external-secrets#3127 - feat: add support for Pulumi ESC by [@​dirien](https://togithub.com/dirien) in [external-secrets/external-secrets#2997 - chore(deps): bump watchdog from 3.0.0 to 4.0.0 in /hack/api-docs by [@​dependabot](https://togithub.com/dependabot) in [external-secrets/external-secrets#3134 - chore(deps): bump certifi from 2023.11.17 to 2024.2.2 in /hack/api-docs by [@​dependabot](https://togithub.com/dependabot) in [external-secrets/external-secrets#3135 - chore(deps): bump mkdocs-material from 9.5.7 to 9.5.9 in /hack/api-docs by [@​dependabot](https://togithub.com/dependabot) in [external-secrets/external-secrets#3136 - chore(deps): bump golang from 1.21.6 to 1.22.0 by [@​dependabot](https://togithub.com/dependabot) in [external-secrets/external-secrets#3138 - chore(deps): bump golangci/golangci-lint-action from 3.7.0 to 4.0.0 by [@​dependabot](https://togithub.com/dependabot) in [external-secrets/external-secrets#3140 - chore(deps): bump golang from 1.21.6-bookworm to 1.22.0-bookworm in /e2e by [@​dependabot](https://togithub.com/dependabot) in [external-secrets/external-secrets#3139 - chore(deps): bump helm/kind-action from 1.8.0 to 1.9.0 by [@​dependabot](https://togithub.com/dependabot) in [external-secrets/external-secrets#3141 - chore: update dependencies by [@​eso-service-account-app](https://togithub.com/eso-service-account-app) in [external-secrets/external-secrets#3143 - Start the helm workflow when files in deploy/crds change by [@​shuheiktgw](https://togithub.com/shuheiktgw) in [external-secrets/external-secrets#3098 - Implements Webhook Generator by [@​gusfcarvalho](https://togithub.com/gusfcarvalho) in [external-secrets/external-secrets#3121 - Run unit tests on the main branch by [@​shuheiktgw](https://togithub.com/shuheiktgw) in [external-secrets/external-secrets#3126 - fix(docs): Fix indentation in `vault-pushsecret.yaml` by [@​mboutet](https://togithub.com/mboutet) in [external-secrets/external-secrets#3156 - issue/3153 - added missing snapshots for Pulumi and Chef crd tests by [@​fdberlking](https://togithub.com/fdberlking) in [external-secrets/external-secrets#3154 #### New Contributors - [@​sourav977](https://togithub.com/sourav977) made their first contribution in [external-secrets/external-secrets#3127 - [@​dirien](https://togithub.com/dirien) made their first contribution in [external-secrets/external-secrets#2997 - [@​mboutet](https://togithub.com/mboutet) made their first contribution in [external-secrets/external-secrets#3156 **Full Changelog**: external-secrets/external-secrets@v0.9.12...v0.9.13 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xOTQuMSIsInVwZGF0ZWRJblZlciI6IjM3LjE5NC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: lumiere-bot[bot] <98047013+lumiere-bot[bot]@users.noreply.github.com>
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [external-secrets](https://togithub.com/external-secrets/external-secrets) | patch | `0.9.12` -> `0.9.13` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>external-secrets/external-secrets (external-secrets)</summary> ### [`v0.9.13`](https://togithub.com/external-secrets/external-secrets/releases/tag/v0.9.13) [Compare Source](https://togithub.com/external-secrets/external-secrets/compare/v0.9.12...v0.9.13) Image: `ghcr.io/external-secrets/external-secrets:v0.9.13` Image: `ghcr.io/external-secrets/external-secrets:v0.9.13-ubi` Image: `ghcr.io/external-secrets/external-secrets:v0.9.13-ubi-boringssl` #### What's Changed - bump 0.9.12 by [@​rogertuma](https://togithub.com/rogertuma) in [external-secrets/external-secrets#3125 - temporarily removing ossf checks for helm release by [@​gusfcarvalho](https://togithub.com/gusfcarvalho) in [external-secrets/external-secrets#3128 - chore(deps): bump aquasecurity/trivy-action from [`f3d9851`](https://togithub.com/external-secrets/external-secrets/commit/f3d98514b056d8c71a3552e8328c225bc7f6f353) to [`84384bd`](https://togithub.com/external-secrets/external-secrets/commit/84384bd6e777ef152729993b8145ea352e9dd3ef) by [@​dependabot](https://togithub.com/dependabot) in [external-secrets/external-secrets#3142 - chore(deps): bump ubi8/ubi-minimal from `c9c8f91` to `6825946` by [@​dependabot](https://togithub.com/dependabot) in [external-secrets/external-secrets#3137 - feat: add push secret to e2e tests by [@​Skarlso](https://togithub.com/Skarlso) in [external-secrets/external-secrets#3017 - Implementation of Chef External Secrets Provider by [@​sourav977](https://togithub.com/sourav977) in [external-secrets/external-secrets#3127 - feat: add support for Pulumi ESC by [@​dirien](https://togithub.com/dirien) in [external-secrets/external-secrets#2997 - chore(deps): bump watchdog from 3.0.0 to 4.0.0 in /hack/api-docs by [@​dependabot](https://togithub.com/dependabot) in [external-secrets/external-secrets#3134 - chore(deps): bump certifi from 2023.11.17 to 2024.2.2 in /hack/api-docs by [@​dependabot](https://togithub.com/dependabot) in [external-secrets/external-secrets#3135 - chore(deps): bump mkdocs-material from 9.5.7 to 9.5.9 in /hack/api-docs by [@​dependabot](https://togithub.com/dependabot) in [external-secrets/external-secrets#3136 - chore(deps): bump golang from 1.21.6 to 1.22.0 by [@​dependabot](https://togithub.com/dependabot) in [external-secrets/external-secrets#3138 - chore(deps): bump golangci/golangci-lint-action from 3.7.0 to 4.0.0 by [@​dependabot](https://togithub.com/dependabot) in [external-secrets/external-secrets#3140 - chore(deps): bump golang from 1.21.6-bookworm to 1.22.0-bookworm in /e2e by [@​dependabot](https://togithub.com/dependabot) in [external-secrets/external-secrets#3139 - chore(deps): bump helm/kind-action from 1.8.0 to 1.9.0 by [@​dependabot](https://togithub.com/dependabot) in [external-secrets/external-secrets#3141 - chore: update dependencies by [@​eso-service-account-app](https://togithub.com/eso-service-account-app) in [external-secrets/external-secrets#3143 - Start the helm workflow when files in deploy/crds change by [@​shuheiktgw](https://togithub.com/shuheiktgw) in [external-secrets/external-secrets#3098 - Implements Webhook Generator by [@​gusfcarvalho](https://togithub.com/gusfcarvalho) in [external-secrets/external-secrets#3121 - Run unit tests on the main branch by [@​shuheiktgw](https://togithub.com/shuheiktgw) in [external-secrets/external-secrets#3126 - fix(docs): Fix indentation in `vault-pushsecret.yaml` by [@​mboutet](https://togithub.com/mboutet) in [external-secrets/external-secrets#3156 - issue/3153 - added missing snapshots for Pulumi and Chef crd tests by [@​fdberlking](https://togithub.com/fdberlking) in [external-secrets/external-secrets#3154 #### New Contributors - [@​sourav977](https://togithub.com/sourav977) made their first contribution in [external-secrets/external-secrets#3127 - [@​dirien](https://togithub.com/dirien) made their first contribution in [external-secrets/external-secrets#2997 - [@​mboutet](https://togithub.com/mboutet) made their first contribution in [external-secrets/external-secrets#3156 **Full Changelog**: external-secrets/external-secrets@v0.9.12...v0.9.13 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xOTQuMSIsInVwZGF0ZWRJblZlciI6IjM3LjE5NC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: lumiere-bot[bot] <98047013+lumiere-bot[bot]@users.noreply.github.com>
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [external-secrets](https://togithub.com/external-secrets/external-secrets) | patch | `0.9.12` -> `0.9.13` | --- ### Release Notes <details> <summary>external-secrets/external-secrets (external-secrets)</summary> ### [`v0.9.13`](https://togithub.com/external-secrets/external-secrets/releases/tag/v0.9.13) [Compare Source](https://togithub.com/external-secrets/external-secrets/compare/v0.9.12...v0.9.13) Image: `ghcr.io/external-secrets/external-secrets:v0.9.13` Image: `ghcr.io/external-secrets/external-secrets:v0.9.13-ubi` Image: `ghcr.io/external-secrets/external-secrets:v0.9.13-ubi-boringssl` #### What's Changed - bump 0.9.12 by [@​rogertuma](https://togithub.com/rogertuma) in [external-secrets/external-secrets#3125 - temporarily removing ossf checks for helm release by [@​gusfcarvalho](https://togithub.com/gusfcarvalho) in [external-secrets/external-secrets#3128 - chore(deps): bump aquasecurity/trivy-action from [`f3d9851`](https://togithub.com/external-secrets/external-secrets/commit/f3d98514b056d8c71a3552e8328c225bc7f6f353) to [`84384bd`](https://togithub.com/external-secrets/external-secrets/commit/84384bd6e777ef152729993b8145ea352e9dd3ef) by [@​dependabot](https://togithub.com/dependabot) in [external-secrets/external-secrets#3142 - chore(deps): bump ubi8/ubi-minimal from `c9c8f91` to `6825946` by [@​dependabot](https://togithub.com/dependabot) in [external-secrets/external-secrets#3137 - feat: add push secret to e2e tests by [@​Skarlso](https://togithub.com/Skarlso) in [external-secrets/external-secrets#3017 - Implementation of Chef External Secrets Provider by [@​sourav977](https://togithub.com/sourav977) in [external-secrets/external-secrets#3127 - feat: add support for Pulumi ESC by [@​dirien](https://togithub.com/dirien) in [external-secrets/external-secrets#2997 - chore(deps): bump watchdog from 3.0.0 to 4.0.0 in /hack/api-docs by [@​dependabot](https://togithub.com/dependabot) in [external-secrets/external-secrets#3134 - chore(deps): bump certifi from 2023.11.17 to 2024.2.2 in /hack/api-docs by [@​dependabot](https://togithub.com/dependabot) in [external-secrets/external-secrets#3135 - chore(deps): bump mkdocs-material from 9.5.7 to 9.5.9 in /hack/api-docs by [@​dependabot](https://togithub.com/dependabot) in [external-secrets/external-secrets#3136 - chore(deps): bump golang from 1.21.6 to 1.22.0 by [@​dependabot](https://togithub.com/dependabot) in [external-secrets/external-secrets#3138 - chore(deps): bump golangci/golangci-lint-action from 3.7.0 to 4.0.0 by [@​dependabot](https://togithub.com/dependabot) in [external-secrets/external-secrets#3140 - chore(deps): bump golang from 1.21.6-bookworm to 1.22.0-bookworm in /e2e by [@​dependabot](https://togithub.com/dependabot) in [external-secrets/external-secrets#3139 - chore(deps): bump helm/kind-action from 1.8.0 to 1.9.0 by [@​dependabot](https://togithub.com/dependabot) in [external-secrets/external-secrets#3141 - chore: update dependencies by [@​eso-service-account-app](https://togithub.com/eso-service-account-app) in [external-secrets/external-secrets#3143 - Start the helm workflow when files in deploy/crds change by [@​shuheiktgw](https://togithub.com/shuheiktgw) in [external-secrets/external-secrets#3098 - Implements Webhook Generator by [@​gusfcarvalho](https://togithub.com/gusfcarvalho) in [external-secrets/external-secrets#3121 - Run unit tests on the main branch by [@​shuheiktgw](https://togithub.com/shuheiktgw) in [external-secrets/external-secrets#3126 - fix(docs): Fix indentation in `vault-pushsecret.yaml` by [@​mboutet](https://togithub.com/mboutet) in [external-secrets/external-secrets#3156 - issue/3153 - added missing snapshots for Pulumi and Chef crd tests by [@​fdberlking](https://togithub.com/fdberlking) in [external-secrets/external-secrets#3154 #### New Contributors - [@​sourav977](https://togithub.com/sourav977) made their first contribution in [external-secrets/external-secrets#3127 - [@​dirien](https://togithub.com/dirien) made their first contribution in [external-secrets/external-secrets#2997 - [@​mboutet](https://togithub.com/mboutet) made their first contribution in [external-secrets/external-secrets#3156 **Full Changelog**: external-secrets/external-secrets@v0.9.12...v0.9.13 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xOTQuMSIsInVwZGF0ZWRJblZlciI6IjM3LjE5NC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: kireque-bot[bot] <143391978+kireque-bot[bot]@users.noreply.github.com>
* feat: add push secret to e2e tests Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * finally, a fully working example for an e2e flow with push secret Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * fix value field duplication issue Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> --------- Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
Problem Statement
What is the problem you're trying to solve?
Related Issue
Details about the edit. The refactor now includes a different setup for tests using PushSecret. The reason why it's separate from the ExternalSecret things is because it requires different things as a source. For example, it requires a source secret to exist in Kubernetes.
The proof, however, is a bit difficult. I included a sample test case under
e2e/suites/provider/cases/template/template.go
. The only way to prove that PushSecret succeeded in what it wanted to push is by either checking if the Status of the push secret is a success, as in conditionReady
istrue
, or by using ANOTHERExternalSecret
to fetch the value that the push secret created.I'm debating baking that into the default test case, but you might not want to do that based on your scenario.
That said, if the need arises, we can always refactor it and include the ExternalSecret part into the default test case setup to make the actual test case leaner.
Proposed Changes
How do you like to solve the issue and why?
Checklist
git commit --signoff
make test
make reviewable