From 28a1cb0481cc145cbe9a2ad688d85d7dbcb03a08 Mon Sep 17 00:00:00 2001 From: chronolaw Date: Tue, 24 Sep 2024 14:10:17 +0800 Subject: [PATCH] kong.core_cache --- kong/init.lua | 5 +++-- spec/02-integration/09-hybrid_mode/03-pki_spec.lua | 8 ++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/kong/init.lua b/kong/init.lua index e0a78f8a9fe9..0acd8a476d41 100644 --- a/kong/init.lua +++ b/kong/init.lua @@ -869,6 +869,7 @@ function Kong.init_worker() err) return end + kong.core_cache = core_cache kong.db:set_events_handler(worker_events) @@ -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, @@ -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 diff --git a/spec/02-integration/09-hybrid_mode/03-pki_spec.lua b/spec/02-integration/09-hybrid_mode/03-pki_spec.lua index 00d8b483cdc1..de2a1743ee06 100644 --- a/spec/02-integration/09-hybrid_mode/03-pki_spec.lua +++ b/spec/02-integration/09-hybrid_mode/03-pki_spec.lua @@ -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, { @@ -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({ @@ -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) @@ -158,4 +161,5 @@ describe("CP/DP PKI sync #" .. strategy, function() end) end) -end +end -- for _, strategy +end -- for cluster_rpc