Skip to content

Commit

Permalink
fix tests, fix missig slash in socket path
Browse files Browse the repository at this point in the history
  • Loading branch information
brentos committed Aug 23, 2024
1 parent 65a9ca1 commit 90761b1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion kong/tools/stream_api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ local HEADER_LEN = #st_pack(PACK_F, MAX_KEY_LEN, MAX_DATA_LEN)

-- this module may be loaded before `kong.configuration` is initialized
local SOCKET_PATH = "unix:" .. ngx.config.prefix() .. "/"
.. constants.SOCKET_DIRECTORY .. constants.SOCKETS.STREAM_RPC
.. constants.SOCKET_DIRECTORY .. "/" .. constants.SOCKETS.STREAM_RPC

local stream_api = {}

Expand Down
10 changes: 9 additions & 1 deletion spec/01-unit/03-conf_loader_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2472,6 +2472,14 @@ describe("Configuration loader", function()
-- CONF_BASIC
prefix = true,
socket_path = true,
socket_path = true,
worker_events_sock = true,
stream_worker_events_sock = true,
stream_rpc_sock = true,
stream_config_sock = true,
stream_tls_passthrough_sock = true,
stream_tls_terminate_sock = true,
cluster_proxy_ssl_terminator_sock = true,
vaults = true,
database = true,
lmdb_environment_path = true,
Expand Down Expand Up @@ -2522,7 +2530,7 @@ describe("Configuration loader", function()
}
local conf = assert(conf_loader(nil, nil, { pre_cmd = true }))
for k, _ in pairs(conf) do
assert.equal(true, FIELDS[k])
assert.equal(true, FIELDS[k], "key " .. k .. " is not in FIELDS")
end
end)
end)
Expand Down

0 comments on commit 90761b1

Please sign in to comment.