Skip to content

Commit

Permalink
fix: fix code
Browse files Browse the repository at this point in the history
  • Loading branch information
oowl committed Nov 3, 2023
1 parent c47f012 commit 4aabbd5
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions spec/03-plugins/35-azure-functions/01-access_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -98,42 +98,39 @@ for _, strategy in helpers.each_strategy() do
dns_mock = helpers.dns_mock.new()
}

fixtures.dns_mock:A({
name = "azure.example.com",
address = "127.0.0.1",
local route3 = db.routes:insert {
hosts = { "azure3.com" },
protocols = { "http", "https" },
service = db.services:insert(
{
name = "azure3",
host = "mockbin.org",
host = "azure.example.com", -- just mock service, it will not be requested
port = 80,
path = "/request",
}
),
}

-- this plugin definition results in an upstream url to
-- http://mockbin.org/request
-- which will echo the request for inspection
db.plugins:insert {
name = "azure-functions",
route = { id = route3.id },
config = {
https = true,
appname = "mockbin",
hostdomain = "org",
https = false,
appname = "azure",
hostdomain = "example.com",
routeprefix = "request",
functionname = "test-func-name",
apikey = "anything_but_an_API_key",
clientid = "and_no_clientid",
},
}

assert(helpers.start_kong{
database = strategy,
plugins = "azure-functions",
fixtures.dns_mock:A({
name = "azure.example.com",
address = "127.0.0.1",
})

assert(helpers.start_kong({
Expand Down

0 comments on commit 4aabbd5

Please sign in to comment.