-
Notifications
You must be signed in to change notification settings - Fork 139
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
Test that overwrite env var works in nested action #453
Test that overwrite env var works in nested action #453
Conversation
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.
Hey @leonardovillela, thanks for taking this on!
Based on #350, the expected behavior is described as the env var should have the new value after a subsequent call to vault-action. Perhaps, a simple enough approach to testing it could be the following. We don't need a separate action file for this approach.
- Creating another endpoint to
secret/data
that has a differentsecret
value
await got(`http://${vaultUrl}/v1/secret/data/subsequent-test`, {
method: 'POST',
headers: {
'X-Vault-Token': vaultToken,
},
json: {
data: {
secret: 'SUBSEQUENT_TEST_SECRET',
},
},
});
- Calling vault-action twice and reading
secret/data/test
and the new endpoint subsequently
- name: Test Vault Action Overwrites Env Vars In Subsequent Action (part 1/2)
uses: ./
with:
url: http://localhost:8200/
token: testtoken
secrets: |
secret/data/test secret | SUBSEQUENT_TEST_SECRET;
- name: Test Vault Action Overwrites Env Vars In Subsequent Action (part 2/2)
uses: ./
with:
url: http://localhost:8200/
token: testtoken
secrets: |
secret/data/subsequent-test secret | SUBSEQUENT_TEST_SECRET;
45296a6
to
1d5aa91
Compare
Hi @thyton, thanks for your review 🙇
On #350 the scenario described include also a new action that calls the |
This reverts commit d27529e.
…action (#453)" (#467) Fix e2e CI failure VAULT-17057 Co-authored-by: Leonardo Villela <[email protected]>
Description 📜
This PR introduces changes to add an E2E test to verify if it's possible to overwrite env vars value set before in a nested action. This test is nice to ensure we do not introduce this bug again as a regression in the future.
Closes #350
cc:
@Zlaticanin