refactor lua balancer and fix ipv6 issue

This commit is contained in:
Elvin Efendi 2018-05-30 17:14:28 -04:00
parent 082325b6f5
commit 4b07e73e5d
7 changed files with 16 additions and 29 deletions

View file

@ -21,9 +21,8 @@ describe("Balancer chash", function()
}
local instance = balancer_chash:new(backend)
local host, port = instance:balance()
assert.equal("10.184.7.40", host)
assert.equal("8080", port)
local peer = instance:balance()
assert.equal("10.184.7.40:8080", peer)
end)
end)
end)