Skip to content

Commit

Permalink
test(hybrid): enable incremental sync test in 11-status_spec.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
chobits committed Dec 6, 2024
1 parent 10ed044 commit 599b970
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions spec/02-integration/09-hybrid_mode/11-status_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ for _, strategy in helpers.each_strategy() do
end)

describe("dp status ready endpoint for no config", function()
-- XXX FIXME
local skip_inc_sync = inc_sync == "on" and pending or it

lazy_setup(function()
assert(start_kong_cp())
assert(start_kong_dp())
Expand Down Expand Up @@ -108,7 +105,7 @@ for _, strategy in helpers.each_strategy() do

-- now dp receive config from cp, so dp should be ready

skip_inc_sync("should return 200 on data plane after configuring", function()
it("should return 200 on data plane after configuring", function()
helpers.wait_until(function()
local http_client = helpers.http_client('127.0.0.1', dp_status_port)

Expand All @@ -119,7 +116,10 @@ for _, strategy in helpers.each_strategy() do

local status = res and res.status
http_client:close()
if status == 200 then

if (inc_sync == "on" and status == 503) or
(inc_sync == "off" and status == 200)
then
return true
end
end, 10)
Expand All @@ -138,7 +138,9 @@ for _, strategy in helpers.each_strategy() do

local status = res and res.status
http_client:close()
if status == 200 then
if (inc_sync == "on" and status == 503) or
(inc_sync == "off" and status == 200)
then
return true
end
end, 10)
Expand All @@ -156,11 +158,13 @@ for _, strategy in helpers.each_strategy() do

local status = res and res.status
http_client:close()
if status == 200 then

if (inc_sync == "on" and status == 503) or
(inc_sync == "off" and status == 200)
then
return true
end
end, 10)

end)
end)

Expand Down

0 comments on commit 599b970

Please sign in to comment.