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 May 13, 2024
1 parent 3d8b328 commit 43ece33
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deck-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ jobs:
if: ${{ fromJson(steps.find-review.outputs.result).review_id != '' && steps.deck_tests.outcome == 'success' }}
uses: actions/github-script@v7
with:
github-token: ${{ secrets.PAT }}
script: |
github.rest.pulls.dismissReview({
owner: context.repo.owner,
Expand Down
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

0 comments on commit 43ece33

Please sign in to comment.