From d34df4c9d559df214978e5fdc1dc76b782121bd2 Mon Sep 17 00:00:00 2001 From: Richard Simpson Date: Fri, 20 Sep 2019 15:37:40 -0500 Subject: [PATCH] chore: add vault image to test --- .github/workflows/test.yml | 24 +++++++++++++++++++++++- quicktest.js | 12 ++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 quicktest.js diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b1b1871..b91a2ae 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 + diff --git a/quicktest.js b/quicktest.js new file mode 100644 index 0000000..1b7979a --- /dev/null +++ b/quicktest.js @@ -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); +})(); \ No newline at end of file