Update tests to account for balance() return value
This commit is contained in:
parent
86c1b1211c
commit
14145b3129
1 changed files with 4 additions and 8 deletions
|
@ -94,10 +94,8 @@ describe("Sticky", function()
|
|||
context("when client doesn't have a cookie set", function()
|
||||
it("should pick an endpoint for the client", function()
|
||||
local sticky_balancer_instance = sticky:new(test_backend)
|
||||
local ip, port = sticky_balancer_instance:balance()
|
||||
assert.truthy(ip)
|
||||
assert.truthy(port)
|
||||
assert.equal(ip .. ":" .. port, test_backend_endpoint)
|
||||
local peer = sticky_balancer_instance:balance()
|
||||
assert.equal(peer, test_backend_endpoint)
|
||||
end)
|
||||
|
||||
it("should set a cookie on the client", function()
|
||||
|
@ -142,10 +140,8 @@ describe("Sticky", function()
|
|||
|
||||
it("should return the correct endpoint for the client", function()
|
||||
local sticky_balancer_instance = sticky:new(test_backend)
|
||||
local ip, port = sticky_balancer_instance:balance()
|
||||
assert.truthy(ip)
|
||||
assert.truthy(port)
|
||||
assert.equal(ip .. ":" .. port, test_backend_endpoint)
|
||||
local peer = sticky_balancer_instance:balance()
|
||||
assert.equal(peer, test_backend_endpoint)
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
|
|
Loading…
Reference in a new issue