From 3ff5b38997182426c88d4324b156f65f98234046 Mon Sep 17 00:00:00 2001 From: Aapo Talvensaari Date: Thu, 24 Feb 2022 16:16:25 +0200 Subject: [PATCH] tests(vault) fix this branch to work with vault tests --- kong/pdk/vault.lua | 2 +- spec/02-integration/02-cmd/14-vault_spec.lua | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/kong/pdk/vault.lua b/kong/pdk/vault.lua index 77be23caeb11..2a43ae02de35 100644 --- a/kong/pdk/vault.lua +++ b/kong/pdk/vault.lua @@ -197,7 +197,7 @@ local function config_secret(reference, opts) if not vault then if err then - return nil, fmt("unable to load vault (%s): %s [%s]", name, err, reference) + return nil, fmt("vault not found (%s): %s [%s]", name, err, reference) end return nil, fmt("vault not found (%s) [%s]", name, reference) diff --git a/spec/02-integration/02-cmd/14-vault_spec.lua b/spec/02-integration/02-cmd/14-vault_spec.lua index dd5299a1d208..c46f6b6989d1 100644 --- a/spec/02-integration/02-cmd/14-vault_spec.lua +++ b/spec/02-integration/02-cmd/14-vault_spec.lua @@ -30,7 +30,8 @@ describe("kong vault", function() it("vault get with non-existing vault", function() local ok, stderr, stdout = helpers.kong_exec("vault get none/foo") - assert.matches("Error: vault not found (none) [{vault://none/foo}]", stderr, nil, true) + assert.matches("Error: vault not found (none)", stderr, nil, true) + assert.matches("[{vault://none/foo}]", stderr, nil, true) assert.is_nil(stdout) assert.is_false(ok) end)