From e9059eef0131ef2a2008c3ed8938c634addb8860 Mon Sep 17 00:00:00 2001 From: Frank Gadban Date: Tue, 21 Jul 2020 22:02:23 +0200 Subject: [PATCH] fixed some typos Signed-off-by: Frank Gadban --- rootfs/etc/nginx/lua/balancer.lua | 2 +- rootfs/etc/nginx/lua/test/util/dns_test.lua | 2 +- rootfs/etc/nginx/lua/util.lua | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rootfs/etc/nginx/lua/balancer.lua b/rootfs/etc/nginx/lua/balancer.lua index fb955337c..be3bbb320 100644 --- a/rootfs/etc/nginx/lua/balancer.lua +++ b/rootfs/etc/nginx/lua/balancer.lua @@ -274,7 +274,7 @@ end function _M.init_worker() -- when worker starts, sync backends without delay -- we call it in timer because for endpoints that require - -- DNS resolution it needs to use socket which is not avalable in + -- DNS resolution it needs to use socket which is not available in -- init_worker phase local ok, err = ngx.timer.at(0, sync_backends) if not ok then diff --git a/rootfs/etc/nginx/lua/test/util/dns_test.lua b/rootfs/etc/nginx/lua/test/util/dns_test.lua index 3c56c1d53..5eb40801e 100644 --- a/rootfs/etc/nginx/lua/test/util/dns_test.lua +++ b/rootfs/etc/nginx/lua/test/util/dns_test.lua @@ -57,7 +57,7 @@ describe("dns.lookup", function() assert.spy(spy_ngx_log).was_called_with(ngx.ERR, "failed to query the DNS server for ", "example.com", ":\n", "server returned error code: 1: format error\nserver returned error code: 1: format error") end) - it("retuns host when there's answer but no A/AAAA record in it", function() + it("returns host when there's answer but no A/AAAA record in it", function() helpers.mock_resty_dns_query(nil, { { name = "example.com", cname = "sub.example.com", ttl = 60 } }) assert.are.same({ "example.com" }, dns_lookup("example.com")) assert.spy(spy_ngx_log).was_called_with(ngx.ERR, "failed to query the DNS server for ", "example.com", ":\n", "no A record resolved\nno AAAA record resolved") diff --git a/rootfs/etc/nginx/lua/util.lua b/rootfs/etc/nginx/lua/util.lua index 103858467..7389f3226 100644 --- a/rootfs/etc/nginx/lua/util.lua +++ b/rootfs/etc/nginx/lua/util.lua @@ -173,7 +173,7 @@ local function tablelength(T) end _M.tablelength = tablelength --- replaces special character value a with value b for all occurences in a +-- replaces special character value a with value b for all occurrences in a -- string local function replace_special_char(str, a, b) return string.gsub(str, "%" .. a, b)