From 428ba359b5c7018e062cf5f1b5efe0979144bafa Mon Sep 17 00:00:00 2001 From: NicholasTanz Date: Fri, 11 Oct 2024 23:32:31 -0400 Subject: [PATCH 1/5] set vault_addr with non-default port and specify addr/token when starting test server Signed-off-by: NicholasTanz add vault_addr env to yaml Signed-off-by: NicholasTanz change back to original setup Signed-off-by: NicholasTanz specify address to listen to and use non-default port Signed-off-by: NicholasTanz --- tests/scripts/init-vault.sh | 5 ++++- tox.ini | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/scripts/init-vault.sh b/tests/scripts/init-vault.sh index f6fc1cd6..af6d8687 100644 --- a/tests/scripts/init-vault.sh +++ b/tests/scripts/init-vault.sh @@ -1,6 +1,9 @@ #!/usr/bin/env bash -vault server -dev -dev-root-token-id="${VAULT_TOKEN}" & +vault server -dev \ + -dev-listen-address="${VAULT_ADDR#http://}" \ # unlike VAULT_ADDR this option does not want the protocol prefix + -dev-root-token-id="${VAULT_TOKEN}" \ + & until vault status do diff --git a/tox.ini b/tox.ini index f612e283..f4fedc6a 100644 --- a/tox.ini +++ b/tox.ini @@ -118,7 +118,7 @@ allowlist_externals = bash setenv = - VAULT_ADDR = http://localhost:8200 + VAULT_ADDR = http://localhost:8201 VAULT_TOKEN = test-root-token commands_pre = From 4c2046f2fbb67cb6082da26ada5d24bc2cc97954 Mon Sep 17 00:00:00 2001 From: NicholasTanz Date: Tue, 29 Oct 2024 00:19:26 -0400 Subject: [PATCH 2/5] change to use default port Signed-off-by: NicholasTanz --- tests/scripts/init-vault.sh | 1 + tox.ini | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/scripts/init-vault.sh b/tests/scripts/init-vault.sh index af6d8687..1bd2788a 100644 --- a/tests/scripts/init-vault.sh +++ b/tests/scripts/init-vault.sh @@ -3,6 +3,7 @@ vault server -dev \ -dev-listen-address="${VAULT_ADDR#http://}" \ # unlike VAULT_ADDR this option does not want the protocol prefix -dev-root-token-id="${VAULT_TOKEN}" \ + -dev-no-store-token \ & until vault status diff --git a/tox.ini b/tox.ini index c0b8c1c9..82161ef3 100644 --- a/tox.ini +++ b/tox.ini @@ -118,7 +118,7 @@ allowlist_externals = bash setenv = - VAULT_ADDR = http://localhost:8201 + VAULT_ADDR = http://localhost:8200 VAULT_TOKEN = test-root-token commands_pre = From 1bf96df7b88eb1fc75a2272f5f911ad144058737 Mon Sep 17 00:00:00 2001 From: NicholasTanz Date: Tue, 29 Oct 2024 00:54:12 -0400 Subject: [PATCH 3/5] remove -dev-no-store-token option Signed-off-by: NicholasTanz --- tests/scripts/init-vault.sh | 1 - tox.ini | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/scripts/init-vault.sh b/tests/scripts/init-vault.sh index 1bd2788a..af6d8687 100644 --- a/tests/scripts/init-vault.sh +++ b/tests/scripts/init-vault.sh @@ -3,7 +3,6 @@ vault server -dev \ -dev-listen-address="${VAULT_ADDR#http://}" \ # unlike VAULT_ADDR this option does not want the protocol prefix -dev-root-token-id="${VAULT_TOKEN}" \ - -dev-no-store-token \ & until vault status diff --git a/tox.ini b/tox.ini index 82161ef3..22716347 100644 --- a/tox.ini +++ b/tox.ini @@ -118,7 +118,7 @@ allowlist_externals = bash setenv = - VAULT_ADDR = http://localhost:8200 + VAULT_ADDR = http://127.0.0.1:8200 VAULT_TOKEN = test-root-token commands_pre = From 5872d2e3dc916c0dd16f3bd1bcc94e20a02e311d Mon Sep 17 00:00:00 2001 From: NicholasTanz Date: Tue, 29 Oct 2024 01:07:49 -0400 Subject: [PATCH 4/5] remove comment + add back in option Signed-off-by: NicholasTanz --- tests/scripts/init-vault.sh | 3 ++- tox.ini | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/scripts/init-vault.sh b/tests/scripts/init-vault.sh index af6d8687..0fb27c01 100644 --- a/tests/scripts/init-vault.sh +++ b/tests/scripts/init-vault.sh @@ -1,8 +1,9 @@ #!/usr/bin/env bash vault server -dev \ - -dev-listen-address="${VAULT_ADDR#http://}" \ # unlike VAULT_ADDR this option does not want the protocol prefix + -dev-listen-address="${VAULT_ADDR#http://}" \ -dev-root-token-id="${VAULT_TOKEN}" \ + -dev-no-store-token \ & until vault status diff --git a/tox.ini b/tox.ini index 22716347..82161ef3 100644 --- a/tox.ini +++ b/tox.ini @@ -118,7 +118,7 @@ allowlist_externals = bash setenv = - VAULT_ADDR = http://127.0.0.1:8200 + VAULT_ADDR = http://localhost:8200 VAULT_TOKEN = test-root-token commands_pre = From bb3bacc6f3bdc8e8ba5283b1a4d10a86d7e99207 Mon Sep 17 00:00:00 2001 From: NicholasTanz Date: Tue, 29 Oct 2024 01:09:33 -0400 Subject: [PATCH 5/5] change back to non-default port 8200 -> 8201 Signed-off-by: NicholasTanz --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 82161ef3..c0b8c1c9 100644 --- a/tox.ini +++ b/tox.ini @@ -118,7 +118,7 @@ allowlist_externals = bash setenv = - VAULT_ADDR = http://localhost:8200 + VAULT_ADDR = http://localhost:8201 VAULT_TOKEN = test-root-token commands_pre =