Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[backport -> release/3.3.x] Backport 12691 to release/3.3.x #12714

Merged
merged 2 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions spec/02-integration/02-cmd/03-reload_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe("kong reload #" .. strategy, function()
helpers.clean_prefix()
end)
after_each(function()
helpers.stop_kong(nil, true)
helpers.stop_kong()
end)

it("send a 'reload' signal to a running Nginx master process", function()
Expand Down Expand Up @@ -587,7 +587,7 @@ describe("key-auth plugin invalidation on dbless reload #off", function()

finally(function()
os.remove(yaml_file)
helpers.stop_kong(helpers.test_conf.prefix, true)
helpers.stop_kong(helpers.test_conf.prefix)
if admin_client then
admin_client:close()
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe("Admin API (#" .. strategy .. "): ", function()
end)

lazy_teardown(function()
helpers.stop_kong(nil, true)
helpers.stop_kong()
end)

before_each(function()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ for _, strategy in helpers.each_strategy() do
end)

lazy_teardown(function()
helpers.stop_kong(nil, true)
helpers.stop_kong()
end)

before_each(function()
Expand Down
4 changes: 2 additions & 2 deletions spec/02-integration/04-admin_api/09-routes_routes_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ for _, strategy in helpers.each_strategy() do
end)

lazy_teardown(function()
helpers.stop_kong(nil, true)
helpers.stop_kong()
end)

before_each(function()
Expand Down Expand Up @@ -1973,7 +1973,7 @@ for _, strategy in helpers.each_strategy() do
end)

lazy_teardown(function()
helpers.stop_kong(nil, true)
helpers.stop_kong()
end)

before_each(function()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ for _, strategy in helpers.each_strategy() do
end)

lazy_teardown(function()
helpers.stop_kong(nil, true)
helpers.stop_kong()
end)

before_each(function()
Expand Down
8 changes: 4 additions & 4 deletions spec/02-integration/04-admin_api/15-off_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe("Admin API #off", function()
end)

lazy_teardown(function()
helpers.stop_kong(nil, true)
helpers.stop_kong()
end)

before_each(function()
Expand Down Expand Up @@ -2557,7 +2557,7 @@ describe("Admin API (concurrency tests) #off", function()
end)

after_each(function()
helpers.stop_kong(nil, true)
helpers.stop_kong()

if client then
client:close()
Expand Down Expand Up @@ -2678,7 +2678,7 @@ describe("Admin API #off with Unique Foreign #unique", function()
end)

lazy_teardown(function()
helpers.stop_kong(nil, true)
helpers.stop_kong()
end)

before_each(function()
Expand Down Expand Up @@ -2823,7 +2823,7 @@ describe("Admin API #off worker_consistency=eventual", function()
end)

lazy_teardown(function()
helpers.stop_kong(nil, true)
helpers.stop_kong()
end)

before_each(function()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ for _, strategy in helpers.each_strategy() do
end)

lazy_teardown(function()
helpers.stop_kong(nil, true)
helpers.stop_kong()
end)

before_each(function()
Expand Down
2 changes: 1 addition & 1 deletion spec/02-integration/04-admin_api/19-vaults_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ for _, strategy in helpers.each_strategy() do
end)

lazy_teardown(function()
helpers.stop_kong(nil, true)
helpers.stop_kong()
end)

before_each(function()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ for _, strategy in helpers.all_strategies() do
end)

lazy_teardown(function()
helpers.stop_kong(nil, true)
helpers.stop_kong()
end)

before_each(function()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ for _, strategy in helpers.each_strategy() do
end)

lazy_teardown(function()
helpers.stop_kong(nil, true)
helpers.stop_kong()
end)

before_each(function()
Expand Down
18 changes: 9 additions & 9 deletions spec/02-integration/05-proxy/04-plugins_triggering_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ for _, strategy in helpers.each_strategy() do

lazy_teardown(function()
if proxy_client then proxy_client:close() end
helpers.stop_kong(nil, true)
helpers.stop_kong()
end)

it("checks global configuration without credentials", function()
Expand Down Expand Up @@ -312,7 +312,7 @@ for _, strategy in helpers.each_strategy() do
proxy_client:close()
end

helpers.stop_kong(nil, true)
helpers.stop_kong()
db:truncate("routes")
db:truncate("services")
db:truncate("consumers")
Expand Down Expand Up @@ -405,7 +405,7 @@ for _, strategy in helpers.each_strategy() do

os.remove(FILE_LOG_PATH)

helpers.stop_kong(nil, true)
helpers.stop_kong()
end)

before_each(function()
Expand Down Expand Up @@ -516,7 +516,7 @@ for _, strategy in helpers.each_strategy() do
proxy_client:close()
end

helpers.stop_kong(nil, true)
helpers.stop_kong()

db:truncate("routes")
db:truncate("services")
Expand Down Expand Up @@ -563,7 +563,7 @@ for _, strategy in helpers.each_strategy() do
proxy_client:close()
end

helpers.stop_kong(nil, true)
helpers.stop_kong()
end)

it("runs without causing an internal error", function()
Expand Down Expand Up @@ -743,7 +743,7 @@ for _, strategy in helpers.each_strategy() do

lazy_teardown(function()
helpers.stop_kong("servroot2")
helpers.stop_kong(nil, true)
helpers.stop_kong()
end)


Expand Down Expand Up @@ -1117,7 +1117,7 @@ for _, strategy in helpers.each_strategy() do
proxy_client:close()
end

helpers.stop_kong(nil, true)
helpers.stop_kong()
end)

it("is executed", function()
Expand Down Expand Up @@ -1191,7 +1191,7 @@ for _, strategy in helpers.each_strategy() do
admin_client:close()
end

helpers.stop_kong(nil, true)
helpers.stop_kong()
end)

it("is executed", function()
Expand Down Expand Up @@ -1276,7 +1276,7 @@ for _, strategy in helpers.each_strategy() do
end)

lazy_teardown(function()
helpers.stop_kong(nil, true)
helpers.stop_kong()
end)

it("certificate phase clears context, fix #7054", function()
Expand Down
2 changes: 1 addition & 1 deletion spec/02-integration/05-proxy/09-websockets_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ for _, strategy in helpers.each_strategy() do
end)

lazy_teardown(function()
helpers.stop_kong(nil, true)
helpers.stop_kong()
end)

local function open_socket(uri)
Expand Down
6 changes: 3 additions & 3 deletions spec/02-integration/05-proxy/11-handler_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ for _, strategy in helpers.each_strategy() do

lazy_teardown(function()
if admin_client then admin_client:close() end
helpers.stop_kong(nil, true)
helpers.stop_kong()
end)

it("runs", function()
Expand Down Expand Up @@ -101,7 +101,7 @@ for _, strategy in helpers.each_strategy() do

lazy_teardown(function()
if admin_client then admin_client:close() end
helpers.stop_kong(nil, true)
helpers.stop_kong()
end)

it("doesn't run", function()
Expand Down Expand Up @@ -175,7 +175,7 @@ for _, strategy in helpers.each_strategy() do

lazy_teardown(function()
if admin_client then admin_client:close() end
helpers.stop_kong(nil, true)
helpers.stop_kong()
end)

it("doesn't run", function()
Expand Down
2 changes: 1 addition & 1 deletion spec/02-integration/05-proxy/13-error_handlers_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe("Proxy error handlers", function()
end)

lazy_teardown(function()
helpers.stop_kong(nil, true)
helpers.stop_kong()
end)

before_each(function()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ describe("#postgres upstream keepalive", function()
proxy_client:close()
end

helpers.stop_kong(nil, true)
helpers.stop_kong()
end)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ for _, strategy in helpers.each_strategy() do
end)

lazy_teardown(function()
helpers.stop_kong("servroot1", true)
helpers.stop_kong("servroot2", true)
helpers.stop_kong("servroot1")
helpers.stop_kong("servroot2")
end)

before_each(function()
Expand Down Expand Up @@ -1204,8 +1204,8 @@ for _, strategy in helpers.each_strategy() do
end)

lazy_teardown(function()
helpers.stop_kong("servroot1", true)
helpers.stop_kong("servroot2", true)
helpers.stop_kong("servroot1")
helpers.stop_kong("servroot2")
end)

before_each(function()
Expand Down Expand Up @@ -1349,8 +1349,8 @@ for _, strategy in helpers.each_strategy() do
end)

lazy_teardown(function()
helpers.stop_kong("servroot1", true)
helpers.stop_kong("servroot2", true)
helpers.stop_kong("servroot1")
helpers.stop_kong("servroot2")
end)

before_each(function()
Expand Down
2 changes: 1 addition & 1 deletion spec/02-integration/11-dbless/01-respawn_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe("worker respawn", function()
end)

lazy_teardown(function()
helpers.stop_kong(nil, true)
helpers.stop_kong()
end)

before_each(function()
Expand Down
2 changes: 1 addition & 1 deletion spec/02-integration/11-dbless/02-workers_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe("Workers initialization #off", function()
lazy_teardown(function()
admin_client:close()
proxy_client:close()
helpers.stop_kong(nil, true)
helpers.stop_kong()
end)

it("restarts worker correctly without issues on the init_worker phase when config includes 1000+ plugins", function()
Expand Down
4 changes: 2 additions & 2 deletions spec/02-integration/11-dbless/03-config_persistence_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe("dbless persistence #off", function()
end)

lazy_teardown(function()
helpers.stop_kong(nil, true)
helpers.stop_kong()
end)

it("loads the lmdb config on restarts", function()
Expand Down Expand Up @@ -113,7 +113,7 @@ describe("dbless persistence with a declarative config #off", function()
end)

after_each(function()
helpers.stop_kong(nil, true)
helpers.stop_kong()
end)
lazy_teardown(function()
os.remove(yaml_file)
Expand Down
2 changes: 1 addition & 1 deletion spec/03-plugins/01-legacy_queue_parameter_warning_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ for _, strategy in helpers.each_strategy() do
if admin_client then
admin_client:close()
end
helpers.stop_kong(nil, true)
helpers.stop_kong()
end)

before_each(function()
Expand Down
2 changes: 1 addition & 1 deletion spec/03-plugins/19-hmac-auth/04-invalidations_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ for _, strategy in helpers.each_strategy() do
admin_client:close()
end

helpers.stop_kong(nil, true)
helpers.stop_kong()
end)

local function hmac_sha1_binary(secret, data)
Expand Down
2 changes: 1 addition & 1 deletion spec/03-plugins/20-ldap-auth/02-invalidations_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ for _, ldap_strategy in pairs(ldap_strategies) do
end)

lazy_teardown(function()
helpers.stop_kong(nil, true)
helpers.stop_kong()
end)

local function cache_key(conf, username, password)
Expand Down
2 changes: 1 addition & 1 deletion spec/03-plugins/23-rate-limiting/03-api_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ for _, strategy in helpers.each_strategy() do
admin_client:close()
end

helpers.stop_kong(nil, true)
helpers.stop_kong()
end)

describe("POST", function()
Expand Down
Loading
Loading