This commit is contained in:
Josh Soref 2020-11-27 12:26:53 -05:00
parent fe65e9d22f
commit a8728f3d2c
38 changed files with 1120 additions and 1120 deletions

View file

@ -199,7 +199,7 @@ local function route_to_alternative_balancer(balancer)
local traffic_shaping_policy = alternative_balancer.traffic_shaping_policy
if not traffic_shaping_policy then
ngx.log(ngx.ERR, "traffic shaping policy is not set for balanacer ",
ngx.log(ngx.ERR, "traffic shaping policy is not set for balancer ",
"of backend: ", tostring(backend_name))
return false
end

View file

@ -192,7 +192,7 @@ end
-- This design tradeoffs lack of OCSP response in the first request with better latency.
--
-- Serving stale response ensures that we don't serve another request without OCSP response
-- when the cache entry expires. Instead we serve the signle request with stale response
-- when the cache entry expires. Instead we serve the single request with stale response
-- and enqueue fetch_and_cache_ocsp_response for refetch.
local function ocsp_staple(uid, der_cert)
local response, _, is_stale = ocsp_response_cache:get_stale(uid)

View file

@ -83,7 +83,7 @@ local function handle_servers()
for server, uid in pairs(configuration.servers) do
if uid == EMPTY_UID then
-- notice that we do not delete certificate corresponding to this server
-- this is becase a certificate can be used by multiple servers/hostnames
-- this is because a certificate can be used by multiple servers/hostnames
certificate_servers:delete(server)
else
local success, set_err, forcible = certificate_servers:set(server, uid)

View file

@ -310,7 +310,7 @@ describe("Balancer", function()
it("resolves external name to endpoints when service is of type External name", function()
backend = {
name = "exmaple-com", service = { spec = { ["type"] = "ExternalName" } },
name = "example-com", service = { spec = { ["type"] = "ExternalName" } },
endpoints = {
{ address = "example.com", port = "80", maxFails = 0, failTimeout = 0 }
}
@ -329,7 +329,7 @@ describe("Balancer", function()
}
})
expected_backend = {
name = "exmaple-com", service = { spec = { ["type"] = "ExternalName" } },
name = "example-com", service = { spec = { ["type"] = "ExternalName" } },
endpoints = {
{ address = "192.168.1.1", port = "80" },
{ address = "1.2.3.4", port = "80" },
@ -347,14 +347,14 @@ describe("Balancer", function()
it("wraps IPv6 addresses into square brackets", function()
local backend = {
name = "exmaple-com",
name = "example-com",
endpoints = {
{ address = "::1", port = "8080", maxFails = 0, failTimeout = 0 },
{ address = "192.168.1.1", port = "8080", maxFails = 0, failTimeout = 0 },
}
}
local expected_backend = {
name = "exmaple-com",
name = "example-com",
endpoints = {
{ address = "[::1]", port = "8080", maxFails = 0, failTimeout = 0 },
{ address = "192.168.1.1", port = "8080", maxFails = 0, failTimeout = 0 },

View file

@ -54,7 +54,7 @@ describe("Monitor", function()
end)
describe("flush", function()
it("short circuits when premmature is true (when worker is shutting down)", function()
it("short circuits when premature is true (when worker is shutting down)", function()
local tcp_mock = mock_ngx_socket_tcp()
mock_ngx({ var = {} })
local monitor = require("monitor")