test(exhook): test create ExHook server with bad name

This commit is contained in:
JimMoen 2022-05-13 16:30:03 +08:00
parent 4d73fe83be
commit ce2638d9c3
1 changed files with 17 additions and 0 deletions

View File

@ -200,6 +200,23 @@ t_add_duplicate(Cfg) ->
?assertMatch([<<"default">>, <<"test1">>], emqx_exhook_mgr:running()).
t_add_with_bad_name(Cfg) ->
Template = proplists:get_value(template, Cfg),
Instance = Template#{
name => <<"🤔">>,
url => "http://127.0.0.1:9001"
},
{error, _Reason} = request_api(
post,
api_path(["exhooks"]),
"",
auth_header_(),
Instance
),
?assertMatch([<<"default">>, <<"test1">>], emqx_exhook_mgr:running()).
t_move_front(_) ->
Result = request_api(
post,