=== Test case: muc_http_api_SUITE:message_errors/1 (click for source code)
=== Config value:
[{watchdog,<0.4586.2>},
{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@8ab69311b7db.2024-04-23_06.25.57/big_tests.tests.muc_http_api_SUITE.logs/run.2024-04-23_06.38.11/muc_http_api_suite.message_errors.218754.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@8ab69311b7db.2024-04-23_06.25.57/big_tests.tests.muc_http_api_SUITE.logs/run.2024-04-23_06.38.11/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@8ab69311b7db.2024-04-23_06.25.57"
=== Started at 2024-04-23 06:38:16
*** User 2024-04-23 06:38:16.678 ***🔗
REST request:
Code: 201
Req: {<0.4623.2>,<<"/api/mucs/domain.example.com">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"048c701d02456091">>}],
<<"{\"owner\":\"alicE_message_errors_2861@domain.example.com\",\"nick\":\"ali\",\"name\":\"wonderland-96.667845\"}">>}
Result: {{<<"201">>,<<"Created">>},
[{<<"server">>,<<"Cowboy">>},
{<<"location">>,
<<"http://localhost:8088/api/mucs/domain.example.com/wonderland-96.667845">>},
{<<"date">>,<<"Tue, 23 Apr 2024 06:38:15 GMT">>},
{<<"content-type">>,<<"text/html">>},
{<<"content-length">>,<<"20">>}],
<<"wonderland-96.667845">>,224,2653}
Params: #{body =>
<<"{\"owner\":\"alicE_message_errors_2861@domain.example.com\",\"nick\":\"ali\",\"name\":\"wonderland-96.667845\"}">>,
method => <<"POST">>,path => <<"/api/mucs/domain.example.com">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2024-04-23 06:38:16.680 ***🔗
REST request:
Code: 204
Req: {<0.4635.2>,
<<"/api/mucs/domain.example.com/thisroomdoesnotexist/messages">>,
<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"1935f76d413b7560">>}],
<<"{\"from\":\"alicE_message_errors_2861@domain.example.com\",\"body\":\"Greetings!\"}">>}
Result: {{<<"204">>,<<"No Content">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Tue, 23 Apr 2024 06:38:15 GMT">>}],
<<>>,80,1055}
Params: #{body =>
<<"{\"from\":\"alicE_message_errors_2861@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 2024-04-23 06:38:16.682 ***🔗
REST request fails:
Code: 400
Req: {<0.4645.2>,
<<"/api/mucs/domain.example.com/wonderland-96.667845/messages">>,
<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"86b0aacf1d15081f">>}],
<<"{\"from\":\"alicE_message_errors_2861@domain.example.com\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Tue, 23 Apr 2024 06:38:15 GMT">>},
{<<"content-type">>,<<"text/html">>},
{<<"content-length">>,<<"22">>}],
<<"\"Missing message body\"">>,148,505}
Params: #{body =>
<<"{\"from\":\"alicE_message_errors_2861@domain.example.com\"}">>,
method => <<"POST">>,
path =>
<<"/api/mucs/domain.example.com/wonderland-96.667845/messages">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2024-04-23 06:38:16.684 ***🔗
REST request fails:
Code: 400
Req: {<0.4649.2>,
<<"/api/mucs/domain.example.com/wonderland-96.667845/messages">>,
<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"38bcf89dc41d827b">>}],
<<"{\"body\":\"Greetings!\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Tue, 23 Apr 2024 06:38:15 GMT">>},
{<<"content-type">>,<<"text/html">>},
{<<"content-length">>,<<"20">>}],
<<"\"Missing sender JID\"">>,146,524}
Params: #{body => <<"{\"body\":\"Greetings!\"}">>,method => <<"POST">>,
path =>
<<"/api/mucs/domain.example.com/wonderland-96.667845/messages">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2024-04-23 06:38:16.686 ***🔗
REST request fails:
Code: 400
Req: {<0.4656.2>,
<<"/api/mucs/domain.example.com/wonderland-96.667845/messages">>,
<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"dc88e128e52da881">>}],
<<"{\"from\":\"@invalid\",\"body\":\"Greetings!\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Tue, 23 Apr 2024 06:38:15 GMT">>},
{<<"content-type">>,<<"text/html">>},
{<<"content-length">>,<<"20">>}],
<<"\"Invalid sender JID\"">>,146,678}
Params: #{body => <<"{\"from\":\"@invalid\",\"body\":\"Greetings!\"}">>,
method => <<"POST">>,
path =>
<<"/api/mucs/domain.example.com/wonderland-96.667845/messages">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
=== Ended at 2024-04-23 06:38:16
=== successfully completed test case
=== === Returned value: {{<<"400">>,<<"Bad Request">>},<<"Invalid sender JID">>}