From c8dfab3ee1ffee4803da570d2b4a8895fac6cd76 Mon Sep 17 00:00:00 2001 From: Michael Martin Date: Mon, 9 Dec 2024 14:37:07 -0800 Subject: [PATCH] tests(wasm): add missing filter tags (#13995) * tests(wasm): fix some eventual assertions These checks using assert.eventually() could have yielded a false positive under certain conditions. * tests(wasm): add missing filter tags This adds some missing #off and #postgres tags that are used in CI to filter out certain testing scenarios. (cherry picked from commit 8f35f670914bce85e10b0fe20cb0a3ff72a5d929) --- spec/02-integration/20-wasm/06-clustering_spec.lua | 4 ++-- spec/02-integration/20-wasm/08-declarative_spec.lua | 6 +++--- spec/02-integration/20-wasm/10-wasmtime_spec.lua | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/02-integration/20-wasm/06-clustering_spec.lua b/spec/02-integration/20-wasm/06-clustering_spec.lua index 9e36d4dce667..4d5a63e323d9 100644 --- a/spec/02-integration/20-wasm/06-clustering_spec.lua +++ b/spec/02-integration/20-wasm/06-clustering_spec.lua @@ -237,7 +237,7 @@ describe("#wasm - hybrid mode #postgres" .. " inc_sync=" .. inc_sync, function() res:read_body() if res.status ~= 200 then - return { + return nil, { msg = "bad http status", exp = 200, got = res.status, @@ -269,7 +269,7 @@ describe("#wasm - hybrid mode #postgres" .. " inc_sync=" .. inc_sync, function() res:read_body() if res.status ~= 200 then - return { + return nil, { msg = "bad http status", exp = 200, got = res.status, diff --git a/spec/02-integration/20-wasm/08-declarative_spec.lua b/spec/02-integration/20-wasm/08-declarative_spec.lua index 8ca4da97cb8e..ed75cc66a980 100644 --- a/spec/02-integration/20-wasm/08-declarative_spec.lua +++ b/spec/02-integration/20-wasm/08-declarative_spec.lua @@ -72,7 +72,7 @@ local function expect_field_error(res, field, err) end -describe("#wasm declarative config", function() +describe("#wasm declarative config (db = #off)", function() local admin local proxy local header_name = "x-wasm-dbless" @@ -172,7 +172,7 @@ describe("#wasm declarative config", function() end) -describe("#wasm declarative config (no installed filters)", function() +describe("#wasm declarative config (no installed filters) (db = #off)", function() local tmp_dir lazy_setup(function() @@ -265,7 +265,7 @@ describe("#wasm declarative config (no installed filters)", function() end) end) -describe("#wasm declarative config (wasm = off)", function() +describe("#wasm declarative config (wasm = off) (db = #off)", function() describe("POST /config", function() local client diff --git a/spec/02-integration/20-wasm/10-wasmtime_spec.lua b/spec/02-integration/20-wasm/10-wasmtime_spec.lua index c8a1027935d4..60a5bed93d86 100644 --- a/spec/02-integration/20-wasm/10-wasmtime_spec.lua +++ b/spec/02-integration/20-wasm/10-wasmtime_spec.lua @@ -6,7 +6,7 @@ for _, v in ipairs({ {"off", "off"}, {"on", "off"}, {"on", "on"}, }) do for _, role in ipairs({"traditional", "control_plane", "data_plane"}) do -describe("#wasm wasmtime (role: " .. role .. ")", function() +describe("#wasm wasmtime (role: " .. role .. ") (#postgres, #db)", function() describe("kong prepare", function() local conf local prefix = "./wasm"