=== Test case: muc_http_api_SUITE:message_errors/1 (click for source code)
=== Config value:
[{watchdog,<0.32255.1>},
{preset,"pgsql_mnesia"},
{mim_data_dir,"/home/circleci/project/big_tests/tests/muc_http_api_SUITE_data"},
{tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@a557e8d70b1c.2023-11-17_15.09.37/big_tests.tests.muc_http_api_SUITE.logs/run.2023-11-17_15.20.49/muc_http_api_suite.message_errors.200706.html"},
{tc_group_properties,[{name,negative},parallel]},
{tc_group_path,[]},
{data_dir,"/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/muc_http_api_SUITE_data/"},
{priv_dir,"/home/circleci/project/big_tests/ct_report/ct_run.test@a557e8d70b1c.2023-11-17_15.09.37/big_tests.tests.muc_http_api_SUITE.logs/run.2023-11-17_15.20.49/log_private/"},
{escalus_users,[{alice,[{username,<<"alicE">>},
{server,<<"domain.example.com">>},
{host,<<"localhost">>},
{password,<<"matygrysa">>}]},
{bob,[{username,<<"bOb">>},
{server,<<"domain.example.com">>},
{host,<<"localhost">>},
{password,<<"makrolika">>}]},
{kate,[{username,<<"kate">>},
{server,<<"domain.example.com">>},
{host,<<"localhost">>},
{password,<<"makrowe;p">>}]}]}]
=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@a557e8d70b1c.2023-11-17_15.09.37"
=== Started at 2023-11-17 15:20:54
*** User 2023-11-17 15:20:54.928 ***🔗
REST request:
Code: 201
Req: {<0.32296.1>,<<"/api/mucs/domain.example.com">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"456b581d54c6d066">>}],
<<"{\"owner\":\"alicE_message_errors_2617@domain.example.com\",\"nick\":\"ali\",\"name\":\"wonderland-54.919683\"}">>}
Result: {{<<"201">>,<<"Created">>},
[{<<"server">>,<<"Cowboy">>},
{<<"location">>,
<<"http://localhost:8088/api/mucs/domain.example.com/wonderland-54.919683">>},
{<<"date">>,<<"Fri, 17 Nov 2023 15:20:54 GMT">>},
{<<"content-type">>,<<"text/html">>},
{<<"content-length">>,<<"20">>}],
<<"wonderland-54.919683">>,224,2237}
Params: #{body =>
<<"{\"owner\":\"alicE_message_errors_2617@domain.example.com\",\"nick\":\"ali\",\"name\":\"wonderland-54.919683\"}">>,
method => <<"POST">>,path => <<"/api/mucs/domain.example.com">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2023-11-17 15:20:54.930 ***🔗
REST request:
Code: 204
Req: {<0.32308.1>,
<<"/api/mucs/domain.example.com/thisroomdoesnotexist/messages">>,
<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"d614e78f41e71127">>}],
<<"{\"from\":\"alicE_message_errors_2617@domain.example.com\",\"body\":\"Greetings!\"}">>}
Result: {{<<"204">>,<<"No Content">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Fri, 17 Nov 2023 15:20:54 GMT">>}],
<<>>,80,1010}
Params: #{body =>
<<"{\"from\":\"alicE_message_errors_2617@domain.example.com\",\"body\":\"Greetings!\"}">>,
method => <<"POST">>,
path =>
<<"/api/mucs/domain.example.com/thisroomdoesnotexist/messages">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2023-11-17 15:20:54.932 ***🔗
REST request fails:
Code: 400
Req: {<0.32315.1>,
<<"/api/mucs/domain.example.com/wonderland-54.919683/messages">>,
<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"2f31f8ad124858c5">>}],
<<"{\"from\":\"alicE_message_errors_2617@domain.example.com\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Fri, 17 Nov 2023 15:20:54 GMT">>},
{<<"content-type">>,<<"text/html">>},
{<<"content-length">>,<<"22">>}],
<<"\"Missing message body\"">>,148,740}
Params: #{body =>
<<"{\"from\":\"alicE_message_errors_2617@domain.example.com\"}">>,
method => <<"POST">>,
path =>
<<"/api/mucs/domain.example.com/wonderland-54.919683/messages">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2023-11-17 15:20:54.933 ***🔗
REST request fails:
Code: 400
Req: {<0.32321.1>,
<<"/api/mucs/domain.example.com/wonderland-54.919683/messages">>,
<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"59b83d783f31cfbd">>}],
<<"{\"body\":\"Greetings!\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Fri, 17 Nov 2023 15:20:54 GMT">>},
{<<"content-type">>,<<"text/html">>},
{<<"content-length">>,<<"20">>}],
<<"\"Missing sender JID\"">>,146,698}
Params: #{body => <<"{\"body\":\"Greetings!\"}">>,method => <<"POST">>,
path =>
<<"/api/mucs/domain.example.com/wonderland-54.919683/messages">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2023-11-17 15:20:54.935 ***🔗
REST request fails:
Code: 400
Req: {<0.32325.1>,
<<"/api/mucs/domain.example.com/wonderland-54.919683/messages">>,
<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"737be359e09b83ea">>}],
<<"{\"from\":\"@invalid\",\"body\":\"Greetings!\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Fri, 17 Nov 2023 15:20:54 GMT">>},
{<<"content-type">>,<<"text/html">>},
{<<"content-length">>,<<"20">>}],
<<"\"Invalid sender JID\"">>,146,692}
Params: #{body => <<"{\"from\":\"@invalid\",\"body\":\"Greetings!\"}">>,
method => <<"POST">>,
path =>
<<"/api/mucs/domain.example.com/wonderland-54.919683/messages">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
=== Ended at 2023-11-17 15:20:54
=== successfully completed test case
=== === Returned value: {{<<"400">>,<<"Bad Request">>},<<"Invalid sender JID">>}