fix(tests): fix check apps api test cases
This commit is contained in:
parent
b2b9847c0e
commit
fa37151b69
|
@ -54,11 +54,10 @@ start_listener({Proto, Port, Options}) ->
|
||||||
type => apiKey,
|
type => apiKey,
|
||||||
name => "authorization",
|
name => "authorization",
|
||||||
in => header}}}},
|
in => header}}}},
|
||||||
Modules = minirest_api:find_api_modules(apps()) -- [emqx_mgmt_api_apps],
|
|
||||||
Minirest = #{
|
Minirest = #{
|
||||||
protocol => Proto,
|
protocol => Proto,
|
||||||
base_path => ?BASE_PATH,
|
base_path => ?BASE_PATH,
|
||||||
modules => Modules,
|
modules => api_modules(),
|
||||||
authorization => Authorization,
|
authorization => Authorization,
|
||||||
security => [#{application => []}],
|
security => [#{application => []}],
|
||||||
swagger_global_spec => GlobalSpec},
|
swagger_global_spec => GlobalSpec},
|
||||||
|
@ -117,3 +116,11 @@ apps() ->
|
||||||
_ -> false
|
_ -> false
|
||||||
end
|
end
|
||||||
end, Apps).
|
end, Apps).
|
||||||
|
|
||||||
|
-ifdef(TEST).
|
||||||
|
api_modules() ->
|
||||||
|
minirest_api:find_api_modules(apps()).
|
||||||
|
-else.
|
||||||
|
api_modules() ->
|
||||||
|
minirest_api:find_api_modules(apps()) -- [emqx_mgmt_api_apps].
|
||||||
|
-endif.
|
||||||
|
|
Loading…
Reference in New Issue