Skip to content

Commit

Permalink
fix(test): remove external dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
hanshuebner committed Oct 27, 2023
1 parent 1627287 commit ca4d606
Showing 1 changed file with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,22 @@ describe("Admin API - Reconfiguration Completion -", function()

local function run_tests()

local res = admin_client:post("/services", {
local res = admin_client:post("/plugins", {
body = {
name = "request-termination",
config = {
status_code = 200,
body = "kong terminated the request",
}
},
headers = { ["Content-Type"] = "application/json" },
})
assert.res_status(201, res)

res = admin_client:post("/services", {
body = {
name = "test-service",
url = "http://example.com",
url = "http://127.0.0.1",
},
headers = { ["Content-Type"] = "application/json" },
})
Expand Down Expand Up @@ -67,7 +79,8 @@ describe("Admin API - Reconfiguration Completion -", function()
["X-If-Kong-Transaction-Id"] = kong_transaction_id
}
})
assert.res_status(200, res)
body = assert.res_status(200, res)
assert.equals("kong terminated the request", body)
end)
.has_no_error()
end
Expand Down

0 comments on commit ca4d606

Please sign in to comment.