=== Test case: muc_http_api_SUITE:message_errors/1 (click for source code)
=== Config value:
[{watchdog,<0.73458.0>},
{preset,"odbc_mssql_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@263f7cbb53ed.2024-04-25_14.57.19/big_tests.tests.muc_http_api_SUITE.logs/run.2024-04-25_15.12.21/muc_http_api_suite.message_errors.162819.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@263f7cbb53ed.2024-04-25_14.57.19/big_tests.tests.muc_http_api_SUITE.logs/run.2024-04-25_15.12.21/log_private/"},
{escalus_users,[{alice,[{username,<<"alicE">>},
{server,<<"localhost">>},
{password,<<"matygrysa">>}]},
{bob,[{username,<<"bOb">>},
{server,<<"localhost">>},
{password,<<"makrolika">>}]},
{kate,[{username,<<"kate">>},
{server,<<"localhost">>},
{password,<<"makrowe;p">>}]}]}]
=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@263f7cbb53ed.2024-04-25_14.57.19"
=== Started at 2024-04-25 15:12:26
*** User 2024-04-25 15:12:26.520 ***🔗
REST request:
Code: 201
Req: {<0.73501.0>,<<"/api/mucs/localhost">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"c92a0a8193397e21">>}],
<<"{\"nick\":\"ali\",\"owner\":\"alicE_message_errors_2975@localhost\",\"name\":\"wonderland-46.509652\"}">>}
Result: {{<<"201">>,<<"Created">>},
[{<<"server">>,<<"Cowboy">>},
{<<"location">>,
<<"http://localhost:8088/api/mucs/localhost/wonderland-46.509652">>},
{<<"date">>,<<"Thu, 25 Apr 2024 15:12:25 GMT">>},
{<<"content-type">>,<<"text/html">>},
{<<"content-length">>,<<"20">>}],
<<"wonderland-46.509652">>,215,2775}
Params: #{path => <<"/api/mucs/localhost">>,
server => #{node => mongooseim@localhost},
body =>
<<"{\"nick\":\"ali\",\"owner\":\"alicE_message_errors_2975@localhost\",\"name\":\"wonderland-46.509652\"}">>,
role => admin,method => <<"POST">>,return_headers => true}
*** User 2024-04-25 15:12:26.522 ***🔗
REST request:
Code: 204
Req: {<0.73512.0>,<<"/api/mucs/localhost/thisroomdoesnotexist/messages">>,
<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"7510163bd0a24892">>}],
<<"{\"from\":\"alicE_message_errors_2975@localhost\",\"body\":\"Greetings!\"}">>}
Result: {{<<"204">>,<<"No Content">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 25 Apr 2024 15:12:25 GMT">>}],
<<>>,80,893}
Params: #{path => <<"/api/mucs/localhost/thisroomdoesnotexist/messages">>,
server => #{node => mongooseim@localhost},
body =>
<<"{\"from\":\"alicE_message_errors_2975@localhost\",\"body\":\"Greetings!\"}">>,
role => admin,method => <<"POST">>,return_headers => true}
*** User 2024-04-25 15:12:26.523 ***🔗
REST request fails:
Code: 400
Req: {<0.73522.0>,<<"/api/mucs/localhost/wonderland-46.509652/messages">>,
<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"cf695aac07c1216f">>}],
<<"{\"from\":\"alicE_message_errors_2975@localhost\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 25 Apr 2024 15:12:25 GMT">>},
{<<"content-type">>,<<"text/html">>},
{<<"content-length">>,<<"22">>}],
<<"\"Missing message body\"">>,148,545}
Params: #{path => <<"/api/mucs/localhost/wonderland-46.509652/messages">>,
server => #{node => mongooseim@localhost},
body => <<"{\"from\":\"alicE_message_errors_2975@localhost\"}">>,
role => admin,method => <<"POST">>,return_headers => true}
*** User 2024-04-25 15:12:26.525 ***🔗
REST request fails:
Code: 400
Req: {<0.73528.0>,<<"/api/mucs/localhost/wonderland-46.509652/messages">>,
<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"baea8378e4f2caeb">>}],
<<"{\"body\":\"Greetings!\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 25 Apr 2024 15:12:25 GMT">>},
{<<"content-type">>,<<"text/html">>},
{<<"content-length">>,<<"20">>}],
<<"\"Missing sender JID\"">>,146,581}
Params: #{path => <<"/api/mucs/localhost/wonderland-46.509652/messages">>,
server => #{node => mongooseim@localhost},
body => <<"{\"body\":\"Greetings!\"}">>,role => admin,
method => <<"POST">>,return_headers => true}
*** User 2024-04-25 15:12:26.526 ***🔗
REST request fails:
Code: 400
Req: {<0.73532.0>,<<"/api/mucs/localhost/wonderland-46.509652/messages">>,
<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"8e91b68642cc4980">>}],
<<"{\"from\":\"@invalid\",\"body\":\"Greetings!\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 25 Apr 2024 15:12:25 GMT">>},
{<<"content-type">>,<<"text/html">>},
{<<"content-length">>,<<"20">>}],
<<"\"Invalid sender JID\"">>,146,512}
Params: #{path => <<"/api/mucs/localhost/wonderland-46.509652/messages">>,
server => #{node => mongooseim@localhost},
body => <<"{\"from\":\"@invalid\",\"body\":\"Greetings!\"}">>,
role => admin,method => <<"POST">>,return_headers => true}
=== Ended at 2024-04-25 15:12:26
=== successfully completed test case
=== === Returned value: {{<<"400">>,<<"Bad Request">>},<<"Invalid sender JID">>}