Skip to content

Commit

Permalink
tests(vault) fix this branch to work with vault tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bungle committed Feb 24, 2022
1 parent fc96187 commit 3ff5b38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion kong/pdk/vault.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion spec/02-integration/02-cmd/14-vault_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3ff5b38

Please sign in to comment.