diff --git a/kong-1.4.0-0.rockspec b/kong-1.4.0-0.rockspec index eb99caed36ef..bd86f7d68358 100644 --- a/kong-1.4.0-0.rockspec +++ b/kong-1.4.0-0.rockspec @@ -14,7 +14,7 @@ dependencies = { "inspect == 3.1.1", "luasec == 0.8", "luasocket == 3.0-rc1", - "penlight == 1.5.4", + "penlight == 1.7.0", "lua-resty-http == 0.15", "lua-resty-jit-uuid == 0.0.7", "multipart == 0.5.5", diff --git a/spec/01-unit/01-db/02-db-errors_spec.lua b/spec/01-unit/01-db/02-db-errors_spec.lua index 64b9afa85907..0e2caaa372c2 100644 --- a/spec/01-unit/01-db/02-db-errors_spec.lua +++ b/spec/01-unit/01-db/02-db-errors_spec.lua @@ -52,7 +52,7 @@ describe("DB Errors", function() code = Errors.codes.INVALID_PRIMARY_KEY, name = "invalid primary key", strategy = "some_strategy", - message = [[invalid primary key: '{id2="missing2",id="missing"}']], + message = [[invalid primary key: '{id="missing",id2="missing2"}']], fields = pk, }, err_t) end) @@ -77,7 +77,7 @@ describe("DB Errors", function() code = Errors.codes.INVALID_FOREIGN_KEY, name = "invalid foreign key", strategy = "some_strategy", - message = [[invalid foreign key: '{id2="missing2",id="missing"}']], + message = [[invalid foreign key: '{id="missing",id2="missing2"}']], fields = pk, }, err_t) end) diff --git a/spec/02-integration/03-db/03-plugins_spec.lua b/spec/02-integration/03-db/03-plugins_spec.lua index dec08e4560e3..203d5b0935ec 100644 --- a/spec/02-integration/03-db/03-plugins_spec.lua +++ b/spec/02-integration/03-db/03-plugins_spec.lua @@ -76,9 +76,9 @@ for _, strategy in helpers.each_strategy() do assert.falsy(plugin) assert.match("UNIQUE violation", err) assert.same("unique constraint violation", err_t.name) - assert.same([[UNIQUE violation detected on '{service=null,]] .. - [[name="key-auth",route={id="]] .. route.id .. - [["},consumer=null}']], err_t.message) + assert.same([[UNIQUE violation detected on '{consumer=null,name="key-auth",]] .. + [[route={id="]] .. route.id .. + [["},service=null}']], err_t.message) end) it("does not validate when associated to an incompatible route, or a service with only incompatible routes", function() @@ -149,9 +149,9 @@ for _, strategy in helpers.each_strategy() do assert.falsy(plugin) assert.match("UNIQUE violation", err) assert.same("unique constraint violation", err_t.name) - assert.same([[UNIQUE violation detected on '{service=null,]] .. - [[name="key-auth",route={id="]] .. route.id .. - [["},consumer=null}']], err_t.message) + assert.same([[UNIQUE violation detected on '{consumer=null,name="key-auth",]] .. + [[route={id="]] .. route.id .. + [["},service=null}']], err_t.message) end) end) diff --git a/spec/02-integration/04-admin_api/03-consumers_routes_spec.lua b/spec/02-integration/04-admin_api/03-consumers_routes_spec.lua index e470e2c16417..9c3b9573f177 100644 --- a/spec/02-integration/04-admin_api/03-consumers_routes_spec.lua +++ b/spec/02-integration/04-admin_api/03-consumers_routes_spec.lua @@ -673,9 +673,8 @@ describe("Admin API (#" .. strategy .. "): ", function() assert.same({ code = Errors.codes.UNIQUE_VIOLATION, name = "unique constraint violation", - message = [[UNIQUE violation detected on '{service=null,]] .. - [[name="rewriter",route=null,consumer={id="]] .. - consumer.id .. [["}}']], + message = [[UNIQUE violation detected on '{consumer={id="]] .. consumer.id .. + [["},name="rewriter",route=null,service=null}']], fields = { name = "rewriter", consumer = { diff --git a/spec/02-integration/04-admin_api/09-routes_routes_spec.lua b/spec/02-integration/04-admin_api/09-routes_routes_spec.lua index 0544fc172d8a..0ab91937cf75 100644 --- a/spec/02-integration/04-admin_api/09-routes_routes_spec.lua +++ b/spec/02-integration/04-admin_api/09-routes_routes_spec.lua @@ -1739,9 +1739,9 @@ for _, strategy in helpers.each_strategy() do }, service = ngx.null, }, - message = [[UNIQUE violation detected on '{]] .. - [[service=null,name="basic-auth",route={id="]] .. - route.id .. [["},consumer=null}']], + message = [[UNIQUE violation detected on '{consumer=null,]] .. + [[name="basic-auth",route={id="]] .. + route.id .. [["},service=null}']], name = "unique constraint violation", }, json) end diff --git a/spec/02-integration/04-admin_api/10-services_routes_spec.lua b/spec/02-integration/04-admin_api/10-services_routes_spec.lua index b4bcfd2aeae3..4a43be023110 100644 --- a/spec/02-integration/04-admin_api/10-services_routes_spec.lua +++ b/spec/02-integration/04-admin_api/10-services_routes_spec.lua @@ -523,9 +523,9 @@ for _, strategy in helpers.each_strategy() do id = service.id, } }, - message = [[UNIQUE violation detected on '{]] .. - [[service={id="]] .. service.id .. - [["},name="basic-auth",route=null,consumer=null}']], + message = [[UNIQUE violation detected on '{consumer=null,name="basic-auth",]] .. + [[route=null,service={id="]] .. service.id .. + [["}}']], }, json) end end)