Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions kong/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,8 @@ function Kong.init_worker()
end
kong.core_cache = core_cache

-- Some random changes in a file

kong.db:set_events_handler(worker_events)

if kong.configuration.admin_gui_listeners then
Expand Down Expand Up @@ -967,6 +969,7 @@ function Kong.init_worker()
end
end

-- Some random changes in a file --- 222
ok, err = runloop.update_plugins_iterator()
if not ok then
stash_init_worker_error("failed to build the plugins iterator: " .. err)
Expand Down Expand Up @@ -1055,6 +1058,7 @@ function Kong.ssl_client_hello()
ctx.KONG_PHASE = PHASES.client_hello
end

-- Some random changes in a file --- 333
function Kong.preread()
local ctx = get_ctx_table(fetch_table(CTX_NS, CTX_NARR, CTX_NREC))
if not ctx.KONG_PROCESSING_START then
Expand Down
4 changes: 3 additions & 1 deletion spec/01-unit/01-db/06-postgres_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ local config = {
local Schema = require "kong.db.schema"
local connector = require "kong.db.strategies.postgres.connector".new(config)


-- Some random changes in a file --- 0000
describe("kong.db [#postgres] connector", function()
describe(":infos()", function()
it("returns infos db_ver always with two digit groups divided with dot (.)", function()
Expand Down Expand Up @@ -34,6 +34,7 @@ describe("kong.db [#postgres] connector", function()
db_readonly = false,
}, infos)

-- Some random changes in a file --- 111
infos = connector.infos{ major_version = 9.5, major_minor_version = "9.5.1", config = config }
assert.same({
db_desc = "database",
Expand Down Expand Up @@ -114,6 +115,7 @@ describe("kong.db [#postgres] connector", function()
end)
end)

-- Some random changes in a file --- 222
describe(":query() semaphore", function()
describe("max 1", function()
-- connector in a new scope
Expand Down
1 change: 1 addition & 0 deletions spec/01-unit/22-grpc-utils_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ describe("grpc tools", function()
}, methods)
end)

-- Some random changes in a file --- 11
it("imports recursively", function()
local methods = {}
local grpc_tools_instance = grpc_tools.new()
Expand Down
2 changes: 1 addition & 1 deletion spec/01-unit/27-queue_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ local function wait_until_queue_done(name)
return not Queue._exists(name)
end, 10)
end

-- Some random changes in a file --- 11
describe("plugin queue", function()

lazy_setup(function()
Expand Down
4 changes: 2 additions & 2 deletions spec/03-plugins/23-rate-limiting/03-api_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ for _, strategy in helpers.each_strategy() do

helpers.stop_kong()
end)

-- Some random changes in a file --- 11
describe("POST", function()
local route, route2

Expand Down Expand Up @@ -160,7 +160,7 @@ for _, strategy in helpers.each_strategy() do
local body = cjson.decode(assert.res_status(201, res))
assert.equal("local", body.config.policy)
end)

-- Some random changes in a file --- 222
it("does allow setting policy to cluster on non-dbless", function()
local res = admin_client:post("/plugins", {
body = {
Expand Down
12 changes: 6 additions & 6 deletions spec/03-plugins/23-rate-limiting/04-access_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ local fmt = string.format
local proxy_client = helpers.proxy_client
local table_insert = table.insert
local tonumber = tonumber

-- Some random changes in a file --- 000
local ngx_sleep = ngx.sleep
local ngx_now = ngx.now

Expand Down Expand Up @@ -51,7 +51,7 @@ local function GET(url, opt)

return res
end

-- Some random changes in a file --- 11

local function client_requests(n, proxy_fn)
local ret = {
Expand Down Expand Up @@ -90,7 +90,7 @@ local function client_requests(n, proxy_fn)
return ret
end


-- Some random changes in a file --- 222
local function validate_headers(headers, check_minute, check_hour)
if check_minute then
assert.same({
Expand Down Expand Up @@ -130,7 +130,7 @@ local function validate_headers(headers, check_minute, check_hour)

elseif check_minute then
assert.equal(true, reset <= 60 and reset >= 0)

-- Some random changes in a file --- 222_333_111
else
error("check_hour or check_minute must be true")
end
Expand Down Expand Up @@ -174,7 +174,7 @@ end

local function setup_rl_plugin(admin_client, conf, service, consumer)
local plugin

-- Some random changes in a file --- 222_333_222
if service then
plugin = assert(admin_client:send({
method = "POST",
Expand Down Expand Up @@ -219,7 +219,7 @@ local function setup_rl_plugin(admin_client, conf, service, consumer)

return cjson.decode(assert.res_status(201, plugin))
end

-- Some random changes in a file --- 333
local function setup_key_auth_plugin(admin_client, conf, service)
local plugin

Expand Down
Loading