Skip to content

Commit

Permalink
fix test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
Madhawa Gunasekara authored and Madhawa Gunasekara committed Nov 12, 2023
1 parent bd38248 commit f542242
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
8 changes: 3 additions & 5 deletions apisix/plugins/multi-auth.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,14 @@
-- limitations under the License.
--
local core = require("apisix.core")
local require = require
local pairs = pairs

local schema = {
type = "object",
title = "work with route or service object",
properties = {
auth_plugins = { type = "array", minItems = 2 },
hide_credentials = {
type = "boolean",
default = false,
}
auth_plugins = { type = "array", minItems = 2 }
},
required = { "auth_plugins" },
}
Expand Down
6 changes: 3 additions & 3 deletions docs/en/latest/plugins/multi-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ The `multi-auth` Plugin is used to add multiple authentication methods to a Rout

For Route:

| Name | Type | Required | Default | Description |
|-------------|-------|----------|---------|-----------------------------------------------------------------------------------------|
| auth_plugin | array | True | - | Add supporting auth plugin configuration. |
| Name | Type | Required | Default | Description |
|--------------|-------|----------|---------|--------------------------------------------|
| auth_plugins | array | True | - | Add supporting auth plugins configuration. |

## Enable Plugin

Expand Down
8 changes: 4 additions & 4 deletions t/plugin/multi-auth.t
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ apikey: auth-two
--- request
GET /t
--- error_code: 400
--- response_body
{"error_msg":"failed to check the configuration of plugin multi-auth err: property \"auth_plugins\" is required"}
--- response_body_like eval
qr/\{"error_msg": "failed to check the configuration of plugin multi-auth err: property \\"auth_plugins\\" is required"\}/



Expand Down Expand Up @@ -240,5 +240,5 @@ GET /t
--- request
GET /t
--- error_code: 400
--- response_body
{"error_msg":"failed to check the configuration of plugin multi-auth err: property \"auth_plugins\" validation failed: expect array to have at least 2 items"}
--- response_body_like eval
qr/\{"error_msg": "failed to check the configuration of plugin multi-auth err: property \\"auth_plugins\\" validation failed: expect array to have at least 2 items"\}/

0 comments on commit f542242

Please sign in to comment.