mirror of
https://github.com/hashicorp/vault-action.git
synced 2025-11-07 15:16:56 +00:00
chore: add vault image to test
This commit is contained in:
parent
5c5889eabd
commit
d34df4c9d5
2 changed files with 35 additions and 1 deletions
24
.github/workflows/test.yml
vendored
24
.github/workflows/test.yml
vendored
|
|
@ -3,7 +3,7 @@ name: Test
|
|||
on: [push]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
unit:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
|
|
@ -19,3 +19,25 @@ jobs:
|
|||
npm test
|
||||
env:
|
||||
CI: true
|
||||
|
||||
e2e:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container:
|
||||
image: node:10.16-jessie
|
||||
|
||||
services:
|
||||
vault:
|
||||
image: vault
|
||||
ports:
|
||||
- 8200/tcp
|
||||
env:
|
||||
VAULT_DEV_ROOT_TOKEN_ID: testtoken
|
||||
options: --cap-add=IPC_LOCK
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: test connection
|
||||
run: node quicktest.js
|
||||
|
||||
|
|
|
|||
12
quicktest.js
Normal file
12
quicktest.js
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
const got = require('got');
|
||||
|
||||
(async () => {
|
||||
const result = await got(`localhost:8200/v1/secret/config`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'X-Vault-Token': 'testtoken'
|
||||
}
|
||||
});
|
||||
|
||||
console.log(result.body);
|
||||
})();
|
||||
Loading…
Reference in a new issue