-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
tests(hybrid): enable incremental sync test in 11-status_spec.lua #13985
base: master
Are you sure you want to change the base?
Changes from 1 commit
599b970
55453de
e4f399f
d176dd3
fb4a39b
b618ea6
c8d7637
6077dd2
25fdbd7
ad420e8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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()) | ||
|
@@ -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) | ||
|
||
|
@@ -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) | ||
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. before inserting an entity, it will return 503. The inserting-an-entity case is not added to this case currently. |
||
(inc_sync == "off" and status == 200) | ||
then | ||
return true | ||
end | ||
end, 10) | ||
|
@@ -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) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could work but may not the best solution, since the case title is
"should return 200 on data plane after configuring"
, and the status code is503
when enabling inc_sync.