chore: add vault image to test
This commit is contained in:
24
.github/workflows/test.yml
vendored
24
.github/workflows/test.yml
vendored
@@ -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
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);
|
||||||
|
})();
|
||||||
Reference in New Issue
Block a user