mirror of
https://github.com/hashicorp/vault-action.git
synced 2025-11-06 23:06:54 +00:00
Fix e2e CI failure VAULT-17057 Co-authored-by: Leonardo Villela <leonardo.villela37@gmail.com>
This commit is contained in:
parent
ec2980c187
commit
62aa8bb4c4
4 changed files with 34 additions and 0 deletions
18
.github/workflows/build.yml
vendored
18
.github/workflows/build.yml
vendored
|
|
@ -162,6 +162,24 @@ jobs:
|
||||||
/cubbyhole/test foo ;
|
/cubbyhole/test foo ;
|
||||||
/cubbyhole/test zip | NAMED_CUBBYSECRET ;
|
/cubbyhole/test zip | NAMED_CUBBYSECRET ;
|
||||||
|
|
||||||
|
# The ordering of these two Test Vault Action Overwrites Env Vars In Subsequent Action steps matters
|
||||||
|
# They should come before the Verify Vault Action Outputs step
|
||||||
|
- 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;
|
||||||
|
|
||||||
- name: Verify Vault Action Outputs
|
- name: Verify Vault Action Outputs
|
||||||
run: npm run test:integration:e2e
|
run: npm run test:integration:e2e
|
||||||
env:
|
env:
|
||||||
|
|
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -59,3 +59,6 @@ typings/
|
||||||
|
|
||||||
# next.js build output
|
# next.js build output
|
||||||
.next
|
.next
|
||||||
|
|
||||||
|
# GoLand IDE project files
|
||||||
|
.idea
|
||||||
|
|
|
||||||
|
|
@ -9,5 +9,6 @@ describe('e2e', () => {
|
||||||
expect(process.env.OTHERALTSECRET).toBe("OTHERCUSTOMSECRET");
|
expect(process.env.OTHERALTSECRET).toBe("OTHERCUSTOMSECRET");
|
||||||
expect(process.env.FOO).toBe("bar");
|
expect(process.env.FOO).toBe("bar");
|
||||||
expect(process.env.NAMED_CUBBYSECRET).toBe("zap");
|
expect(process.env.NAMED_CUBBYSECRET).toBe("zap");
|
||||||
|
expect(process.env.SUBSEQUENT_TEST_SECRET).toBe("SUBSEQUENT_TEST_SECRET");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,18 @@ const vaultToken = `${process.env.VAULT_TOKEN}` === undefined ? `${process.env.V
|
||||||
zip: 'zap',
|
zip: 'zap',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await got(`http://${vaultUrl}/v1/secret/data/subsequent-test`, {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'X-Vault-Token': vaultToken,
|
||||||
|
},
|
||||||
|
json: {
|
||||||
|
data: {
|
||||||
|
secret: 'SUBSEQUENT_TEST_SECRET',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue