Skip to content

Commit

Permalink
squashme - add standard webhooks plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
samugi committed Jun 11, 2024
1 parent 2d3e987 commit 7302e73
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions spec/06-third-party/01-deck/01-deck-integration_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,12 @@ local function get_plugins_configs(service)
route_type = "llm/v1/chat",
},
},
},
["standard-webhooks"] = {
name = "standard-webhooks",
config = {
secret_v1 = "test",
},
}
}
end
Expand Down Expand Up @@ -264,7 +270,18 @@ for _, strategy in helpers.each_strategy({ "postgres" }) do
local plugins_configs = get_plugins_configs(service)
for _, plugin in ipairs(plugins) do
if not pending[plugin] then
bp.plugins:insert(plugins_configs[plugin] or { name = plugin })
local ok, err
ok, err = pcall(
bp.plugins.insert,
bp.plugins,
plugins_configs[plugin] or { name = plugin }
)

-- if this assertion fails make sure the plugin is configured
-- correctly with the required fields in the `get_plugins_configs`
-- function above
assert(ok, "failed configuring plugin: " .. plugin .. " with error: "
.. tostring(err))
configured_plugins_num = configured_plugins_num + 1
end
end
Expand Down Expand Up @@ -314,7 +331,9 @@ for _, strategy in helpers.each_strategy({ "postgres" }) do
end

helpers.stop_kong()
cleanup()
if cleanup then
cleanup()
end
end)

it("execute `gateway dump` and `gateway sync` commands successfully", function()
Expand Down

1 comment on commit 7302e73

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bazel Build

Docker image available kong/kong:7302e73a0026a5508ef6e0da2f9112cdfea357bf
Artifacts available https://github.com/Kong/kong/actions/runs/9469806404

Please sign in to comment.