Skip to content

Commit

Permalink
kong.core_cache
Browse files Browse the repository at this point in the history
  • Loading branch information
chronolaw committed Sep 24, 2024
1 parent 0456a98 commit 28a1cb0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 3 additions & 2 deletions kong/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -869,6 +869,7 @@ function Kong.init_worker()
err)
return
end
kong.core_cache = core_cache

kong.db:set_events_handler(worker_events)

Expand Down Expand Up @@ -913,7 +914,7 @@ function Kong.init_worker()
end

elseif declarative_entities then
kong.core_cache = core_cache
--kong.core_cache = core_cache

ok, err = load_declarative_config(kong.configuration,
declarative_entities,
Expand All @@ -940,7 +941,7 @@ function Kong.init_worker()
end
end

kong.core_cache = core_cache
--kong.core_cache = core_cache

local is_not_control_plane = not is_control_plane(kong.configuration)
if is_not_control_plane then
Expand Down
8 changes: 6 additions & 2 deletions spec/02-integration/09-hybrid_mode/03-pki_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ local helpers = require "spec.helpers"
local cjson = require "cjson.safe"


for _, cluster_rpc in ipairs { "on", "off" } do
for _, strategy in helpers.each_strategy() do

describe("CP/DP PKI sync #" .. strategy, function()
describe("CP/DP PKI sync #" .. strategy .. " rpc=" .. cluster_rpc, function()

lazy_setup(function()
helpers.get_db_utils(strategy, {
Expand All @@ -25,6 +26,7 @@ describe("CP/DP PKI sync #" .. strategy, function()
-- additional attributes for PKI:
cluster_mtls = "pki",
cluster_ca_cert = "spec/fixtures/kong_clustering_ca.crt",
cluster_rpc = cluster_rpc,
}))

assert(helpers.start_kong({
Expand All @@ -40,6 +42,7 @@ describe("CP/DP PKI sync #" .. strategy, function()
cluster_mtls = "pki",
cluster_server_name = "kong_clustering",
cluster_ca_cert = "spec/fixtures/kong_clustering.crt",
cluster_rpc = cluster_rpc,
}))
end)

Expand Down Expand Up @@ -158,4 +161,5 @@ describe("CP/DP PKI sync #" .. strategy, function()
end)
end)

end
end -- for _, strategy
end -- for cluster_rpc

0 comments on commit 28a1cb0

Please sign in to comment.