mirror of
https://github.com/hashicorp/vault-action.git
synced 2025-11-07 15:16:56 +00:00
chore: try another angle here
This commit is contained in:
parent
b136f7630b
commit
0933e819ce
2 changed files with 7 additions and 3 deletions
8
.github/workflows/test.yml
vendored
8
.github/workflows/test.yml
vendored
|
|
@ -29,9 +29,9 @@ jobs:
|
||||||
|
|
||||||
services:
|
services:
|
||||||
vault:
|
vault:
|
||||||
image: vault
|
image: vault:1.2.3
|
||||||
ports:
|
ports:
|
||||||
- 8200:8200
|
- 8200/tcp
|
||||||
env:
|
env:
|
||||||
VAULT_DEV_ROOT_TOKEN_ID: testtoken
|
VAULT_DEV_ROOT_TOKEN_ID: testtoken
|
||||||
options: --cap-add=IPC_LOCK
|
options: --cap-add=IPC_LOCK
|
||||||
|
|
@ -43,3 +43,7 @@ jobs:
|
||||||
- name: test connection
|
- name: test connection
|
||||||
run: node quicktest.js
|
run: node quicktest.js
|
||||||
|
|
||||||
|
env:
|
||||||
|
VAULT_HOST: localhost
|
||||||
|
VAULT_PORT: ${{ job.services.vault.ports[8200] }}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
const got = require('got');
|
const got = require('got');
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
const result = await got(`localhost:8200/v1/secret/config`, {
|
const result = await got(`${process.env.VAULT_HOST}:${process.env.VAULT_PORT}/v1/secret/config`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'X-Vault-Token': 'testtoken'
|
'X-Vault-Token': 'testtoken'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue