diff --git a/spec/02-integration/09-hybrid_mode/02-start_stop_spec.lua b/spec/02-integration/09-hybrid_mode/02-start_stop_spec.lua index 43cbf6ec988..6ecfc11a500 100644 --- a/spec/02-integration/09-hybrid_mode/02-start_stop_spec.lua +++ b/spec/02-integration/09-hybrid_mode/02-start_stop_spec.lua @@ -1,7 +1,8 @@ local helpers = require "spec.helpers" -describe("invalid config are rejected", function() +for _, inc_sync in ipairs { "on", "off" } do +describe("invalid config are rejected" .. " inc_sync=" .. inc_sync, function() describe("role is control_plane", function() it("can not disable admin_listen", function() local ok, err = helpers.start_kong({ @@ -11,6 +12,7 @@ describe("invalid config are rejected", function() cluster_cert = "spec/fixtures/kong_clustering.crt", cluster_cert_key = "spec/fixtures/kong_clustering.key", admin_listen = "off", + cluster_incremental_sync = inc_sync, }) assert.False(ok) @@ -25,6 +27,7 @@ describe("invalid config are rejected", function() cluster_cert = "spec/fixtures/kong_clustering.crt", cluster_cert_key = "spec/fixtures/kong_clustering.key", cluster_listen = "off", + cluster_incremental_sync = inc_sync, }) assert.False(ok) @@ -39,6 +42,7 @@ describe("invalid config are rejected", function() cluster_cert = "spec/fixtures/kong_clustering.crt", cluster_cert_key = "spec/fixtures/kong_clustering.key", database = "off", + cluster_incremental_sync = inc_sync, }) assert.False(ok) @@ -53,6 +57,7 @@ describe("invalid config are rejected", function() cluster_cert = "spec/fixtures/kong_clustering.crt", cluster_cert_key = "spec/fixtures/kong_clustering.key", cluster_mtls = "pki", + cluster_incremental_sync = inc_sync, }) assert.False(ok) @@ -69,6 +74,7 @@ describe("invalid config are rejected", function() cluster_cert = "spec/fixtures/kong_clustering.crt", cluster_cert_key = "spec/fixtures/kong_clustering.key", proxy_listen = "off", + cluster_incremental_sync = inc_sync, }) assert.False(ok) @@ -82,6 +88,7 @@ describe("invalid config are rejected", function() prefix = "servroot2", cluster_cert = "spec/fixtures/kong_clustering.crt", cluster_cert_key = "spec/fixtures/kong_clustering.key", + cluster_incremental_sync = inc_sync, }) assert.False(ok) @@ -97,7 +104,8 @@ describe("invalid config are rejected", function() prefix = "servroot2", cluster_cert = "spec/fixtures/kong_clustering.crt", cluster_cert_key = "spec/fixtures/kong_clustering.key", - cluster_dp_labels = "w@:_a" + cluster_dp_labels = "w@:_a", + cluster_incremental_sync = inc_sync, }) assert.False(ok) @@ -113,7 +121,8 @@ describe("invalid config are rejected", function() cluster_cert = "spec/fixtures/kong_clustering.crt", cluster_cert_key = "spec/fixtures/kong_clustering.key", proxy_listen = "0.0.0.0:" .. helpers.get_available_port(), - cluster_dp_labels = "Aa-._zZ_key:Aa-._zZ_val" + cluster_dp_labels = "Aa-._zZ_key:Aa-._zZ_val", + cluster_incremental_sync = inc_sync, }) assert.True(ok) helpers.stop_kong("servroot2") @@ -128,6 +137,7 @@ describe("invalid config are rejected", function() nginx_conf = "spec/fixtures/custom_nginx.template", database = param[2], prefix = "servroot2", + cluster_incremental_sync = inc_sync, }) assert.False(ok) @@ -141,6 +151,7 @@ describe("invalid config are rejected", function() database = param[2], prefix = "servroot2", cluster_cert = "spec/fixtures/kong_clustering.crt", + cluster_incremental_sync = inc_sync, }) assert.False(ok) @@ -151,7 +162,7 @@ describe("invalid config are rejected", function() end) -- note that lagacy modes still error when CP exits -describe("when CP exits before DP", function() +describe("when CP exits before DP" .. " inc_sync=" .. inc_sync, function() local need_exit = true lazy_setup(function() @@ -164,6 +175,7 @@ describe("when CP exits before DP", function() cluster_cert = "spec/fixtures/kong_clustering.crt", cluster_cert_key = "spec/fixtures/kong_clustering.key", cluster_listen = "127.0.0.1:9005", + cluster_incremental_sync = inc_sync, })) assert(helpers.start_kong({ role = "data_plane", @@ -173,6 +185,7 @@ describe("when CP exits before DP", function() cluster_control_plane = "127.0.0.1:9005", proxy_listen = "0.0.0.0:9002", database = "off", + cluster_incremental_sync = inc_sync, -- EE [[ -- vitals uses the clustering strategy by default, and it logs the exact -- same "error while receiving frame from peer" error strings that this @@ -196,3 +209,4 @@ describe("when CP exits before DP", function() assert.logfile("servroot2/logs/error.log").has.no.line("error while receiving frame from peer", true) end) end) +end -- for inc_sync