Skip to content

Commit 554fe31

Browse files
committed
fix failing tests
1 parent 5ad3e15 commit 554fe31

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

spec/resty/http_ng/backend/async_resty_spec.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,8 @@ describe('resty backend', function()
5656
local req = { method = method, url = 'https://untrusted-root.badssl.com/', options = { ssl = { verify = true } } }
5757

5858
local response = backend:send(req)
59-
6059
assert.truthy(response)
61-
assert.match('self signed certificate in certificate chain', response.error)
60+
assert.is_same('19: self-signed certificate in certificate chain', response.error)
6261
assert.equal(req, response.request)
6362
assert.falsy(response.ok)
6463
end)

t/management.t

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ env APICAST_MANAGEMENT_API=debug;
268268
lua_package_path "$TEST_NGINX_LUA_PATH";
269269
init_by_lua_block {
270270
ngx.now = function() return 0 end
271-
local cache = require('resty.resolver.cache').shared():save({ {
271+
local cache = require('resty.resolver.cache').shared():save("127.0.0.1.xip.io", 1, { {
272272
address = "127.0.0.1",
273273
class = 1,
274274
name = "127.0.0.1.xip.io",
@@ -285,8 +285,13 @@ GET /dns/cache
285285
Content-Type: application/json; charset=utf-8
286286
--- expected_response_body_like_multiple eval
287287
[[
288+
qr/"127.0.0.1.xip.io:1":\{/,
289+
qr/"value":\{"1":\{/,
288290
qr/"name":"127.0.0.1.xip.io"/,
289-
qr/\{"127.0.0.1.xip.io":\{"value":{"1":{"address":"127.0.0.1","class":1,"ttl":199/,
291+
qr/"type":1/,
292+
qr/"class":1/,
293+
qr/"address":"127.0.0.1"/,
294+
qr/"ttl":199/,
290295
]]
291296
--- no_error_log
292297
[error]

0 commit comments

Comments
 (0)