diff --git a/kong/core/balancer.lua b/kong/core/balancer.lua index eb32784d611..87185847dc4 100644 --- a/kong/core/balancer.lua +++ b/kong/core/balancer.lua @@ -1,4 +1,3 @@ -local utils = require "kong.tools.utils" local dns_client = require "dns.client" local toip = dns_client.toip diff --git a/spec/01-unit/12-resolver_spec.lua b/spec/01-unit/12-resolver_spec.lua index 131b35bc772..4b60f270481 100644 --- a/spec/01-unit/12-resolver_spec.lua +++ b/spec/01-unit/12-resolver_spec.lua @@ -158,7 +158,7 @@ describe("Resolver", function() end) -- non existant request_path - local api, upstream_url, upstream_host, upstream_table = resolver.execute("/inexistant-mockbin", {}) + local api, upstream_url, upstream_host, _ = resolver.execute("/inexistant-mockbin", {}) assert.falsy(api) assert.falsy(upstream_url) assert.falsy(upstream_host) @@ -303,7 +303,7 @@ describe("Resolver", function() ngx.status = nil end) it("should have or not have a trailing slash depending on the request URI", function() - local api, upstream_url, upstream_host, upstream_table = resolver.execute("/strip/", {}) + local api, upstream_url, _, upstream_table = resolver.execute("/strip/", {}) assert.same(APIS_FIXTURES[9], api) assert.same({ authority = 'mockbin.com', @@ -328,7 +328,7 @@ describe("Resolver", function() end) it("should strip the querystring out of the URI", function() -- it will be re-inserted by core.handler just before proxying, once all plugins have been run and eventually modified it - local api, upstream_url, upstream_host, upstream_table = resolver.execute("/?hello=world&foo=bar", {["Host"] = "mockbin.com"}) + local api, upstream_url, _, upstream_table = resolver.execute("/?hello=world&foo=bar", {["Host"] = "mockbin.com"}) assert.same(APIS_FIXTURES[1], api) assert.same({ authority = 'mockbin.com', diff --git a/spec/02-integration/04-core/03-dns_spec.lua b/spec/02-integration/04-core/03-dns_spec.lua index 336d0924a9f..a6dfc7a69ba 100644 --- a/spec/02-integration/04-core/03-dns_spec.lua +++ b/spec/02-integration/04-core/03-dns_spec.lua @@ -16,7 +16,6 @@ local function bad_tcp_server(port, duration, ...) assert(server:setoption('reuseaddr', true)) assert(server:bind("*", port)) assert(server:listen()) - local clientlist = {} while socket.gettime() < expire do local client, err = server:accept() socket.sleep(0.1) @@ -39,6 +38,7 @@ describe("Core DNS", function() describe("retries", function() local retries = 3 + local client setup(function() assert(helpers.start_kong())