5
0
Fork 0
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:
Richard Simpson 2019-09-20 15:37:40 -05:00
parent 5c5889eabd
commit d34df4c9d5
No known key found for this signature in database
GPG key ID: 0CECAF50D013D1E2
2 changed files with 35 additions and 1 deletions

View file

@ -3,7 +3,7 @@ name: Test
on: [push] on: [push]
jobs: jobs:
test: unit:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -19,3 +19,25 @@ jobs:
npm test npm test
env: env:
CI: true 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
View 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);
})();