File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ describe("Sticky", function()
73
73
end )
74
74
75
75
local test_backend = get_test_backend ()
76
- local test_backend_endpoint = test_backend . endpoints [ 1 ]. address .. " : " .. test_backend .endpoints [1 ]. port
76
+ local test_backend_endpoint = util . get_endpoint_string ( test_backend .endpoints [1 ])
77
77
78
78
local legacy_cookie_value = test_backend_endpoint
79
79
local function create_current_cookie_value (backend_key )
Original file line number Diff line number Diff line change @@ -13,12 +13,16 @@ local re_gmatch = ngx.re.gmatch
13
13
14
14
local _M = {}
15
15
16
+ function _M .get_endpoint_string (endpoint )
17
+ return endpoint .address .. " :" .. endpoint .port
18
+ end
19
+
16
20
function _M .get_nodes (endpoints )
17
21
local nodes = {}
18
22
local weight = 1
19
23
20
24
for _ , endpoint in pairs (endpoints ) do
21
- local endpoint_string = endpoint . address .. " : " .. endpoint . port
25
+ local endpoint_string = _M . get_endpoint_string ( endpoint )
22
26
nodes [endpoint_string ] = weight
23
27
end
24
28
You can’t perform that action at this time.
0 commit comments