Skip to content

Commit

Permalink
fix failing tests
Browse files Browse the repository at this point in the history
Signed-off-by: revolyssup <ashishjaitiwari15112000@gmail.com>
  • Loading branch information
Revolyssup committed Jul 17, 2023
1 parent 4512a1b commit 043f1e1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion apisix/admin/plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function _M.get(name)
if not plugin then
local err = "failed to load plugin " .. name .. " in subsystem " .. subsystem
core.log.warn("failed to load plugin [", name, "] err: ", err)
return 404, nil
return 404, {error_msg = "plugin not found"}
end

local json_schema = plugin.schema
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/latest/admin-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1366,7 +1366,7 @@ Plugin 资源请求地址:/apisix/admin/plugins/{plugin_name}

你可以使用 `/apisix/admin/plugins?all=true` 接口获取所有插件的所有属性,每个插件包括 `name``priority``type``schema``consumer_schema``version`

您可以使用 “/apisix/admin/plugins?all=true” 获取所有插件的所有属性。这个 API 将很快被弃用
您可以使用“/apisix/admin/plugins?all=true”获取所有插件的所有属性。这个 API 将很快被弃用

:::

Expand Down
6 changes: 3 additions & 3 deletions t/admin/plugins.t
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ ext-plugin-post-resp
=== TEST 2: invalid plugin
--- request
GET /apisix/admin/plugins/asdf
--- error_code: 400
--- error_code: 404
--- response_body
{"error_msg":"failed to load plugin asdf in subsystem http"}
{"error_msg":"plugin not found"}
Expand Down Expand Up @@ -445,7 +445,7 @@ qr/\{"error_msg":"unsupported subsystem: asdf"\}/
}
}
--- response_body eval
qr/\{"error_msg":"failed to load plugin http-logger in subsystem stream"\}/
qr/\{"error_msg":"plugin not found"\}/
Expand Down
2 changes: 1 addition & 1 deletion t/admin/schema.t
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ qr/"required":\["count","time_window"\]/
=== TEST 8: get not exist plugin
--- request
GET /apisix/admin/schema/plugins/no-exist
--- error_code: 400
--- error_code: 404



Expand Down

0 comments on commit 043f1e1

Please sign in to comment.