=== Test case: muc_http_api_SUITE:message_errors/1 (click for source code)
=== Config value:
[{watchdog,<0.64423.0>},
{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@a2fc54846062.2023-11-14_11.38.11/big_tests.tests.muc_http_api_SUITE.logs/run.2023-11-14_11.53.20/muc_http_api_suite.message_errors.64261.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@a2fc54846062.2023-11-14_11.38.11/big_tests.tests.muc_http_api_SUITE.logs/run.2023-11-14_11.53.20/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@a2fc54846062.2023-11-14_11.38.11"
=== Started at 2023-11-14 11:53:25
*** User 2023-11-14 11:53:25.721 ***🔗
REST request:
Code: 201
Req: {<0.64472.0>,<<"/api/mucs/domain.example.com">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"0608c91756f2d650">>}],
<<"{\"nick\":\"ali\",\"owner\":\"alicE_message_errors_3140@domain.example.com\",\"name\":\"wonderland-5.702260\"}">>}
Result: {{<<"201">>,<<"Created">>},
[{<<"server">>,<<"Cowboy">>},
{<<"location">>,
<<"http://localhost:8088/api/mucs/domain.example.com/wonderland-5.702260">>},
{<<"date">>,<<"Tue, 14 Nov 2023 11:53:24 GMT">>},
{<<"content-type">>,<<"text/html">>},
{<<"content-length">>,<<"19">>}],
<<"wonderland-5.702260">>,222,2659}
Params: #{path => <<"/api/mucs/domain.example.com">>,
server => #{node => mongooseim@localhost},
body =>
<<"{\"nick\":\"ali\",\"owner\":\"alicE_message_errors_3140@domain.example.com\",\"name\":\"wonderland-5.702260\"}">>,
method => <<"POST">>,role => admin,return_headers => true}
*** User 2023-11-14 11:53:25.724 ***🔗
REST request:
Code: 204
Req: {<0.64485.0>,
<<"/api/mucs/domain.example.com/thisroomdoesnotexist/messages">>,
<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"304744d9bf819ccf">>}],
<<"{\"body\":\"Greetings!\",\"from\":\"alicE_message_errors_3140@domain.example.com\"}">>}
Result: {{<<"204">>,<<"No Content">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Tue, 14 Nov 2023 11:53:24 GMT">>}],
<<>>,80,849}
Params: #{path =>
<<"/api/mucs/domain.example.com/thisroomdoesnotexist/messages">>,
server => #{node => mongooseim@localhost},
body =>
<<"{\"body\":\"Greetings!\",\"from\":\"alicE_message_errors_3140@domain.example.com\"}">>,
method => <<"POST">>,role => admin,return_headers => true}
*** User 2023-11-14 11:53:25.726 ***🔗
REST request fails:
Code: 400
Req: {<0.64491.0>,
<<"/api/mucs/domain.example.com/wonderland-5.702260/messages">>,
<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"48a04e5a3a2ddada">>}],
<<"{\"from\":\"alicE_message_errors_3140@domain.example.com\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Tue, 14 Nov 2023 11:53:24 GMT">>},
{<<"content-type">>,<<"text/html">>},
{<<"content-length">>,<<"22">>}],
<<"\"Missing message body\"">>,148,773}
Params: #{path =>
<<"/api/mucs/domain.example.com/wonderland-5.702260/messages">>,
server => #{node => mongooseim@localhost},
body =>
<<"{\"from\":\"alicE_message_errors_3140@domain.example.com\"}">>,
method => <<"POST">>,role => admin,return_headers => true}
*** User 2023-11-14 11:53:25.727 ***🔗
REST request fails:
Code: 400
Req: {<0.64495.0>,
<<"/api/mucs/domain.example.com/wonderland-5.702260/messages">>,
<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"b9f71928e551fe1c">>}],
<<"{\"body\":\"Greetings!\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Tue, 14 Nov 2023 11:53:24 GMT">>},
{<<"content-type">>,<<"text/html">>},
{<<"content-length">>,<<"20">>}],
<<"\"Missing sender JID\"">>,146,525}
Params: #{path =>
<<"/api/mucs/domain.example.com/wonderland-5.702260/messages">>,
server => #{node => mongooseim@localhost},
body => <<"{\"body\":\"Greetings!\"}">>,method => <<"POST">>,
role => admin,return_headers => true}
*** User 2023-11-14 11:53:25.729 ***🔗
REST request fails:
Code: 400
Req: {<0.64504.0>,
<<"/api/mucs/domain.example.com/wonderland-5.702260/messages">>,
<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"c2366b1b8a7f39c8">>}],
<<"{\"body\":\"Greetings!\",\"from\":\"@invalid\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Tue, 14 Nov 2023 11:53:24 GMT">>},
{<<"content-type">>,<<"text/html">>},
{<<"content-length">>,<<"20">>}],
<<"\"Invalid sender JID\"">>,146,640}
Params: #{path =>
<<"/api/mucs/domain.example.com/wonderland-5.702260/messages">>,
server => #{node => mongooseim@localhost},
body => <<"{\"body\":\"Greetings!\",\"from\":\"@invalid\"}">>,
method => <<"POST">>,role => admin,return_headers => true}
=== Ended at 2023-11-14 11:53:25
=== successfully completed test case
=== === Returned value: {{<<"400">>,<<"Bad Request">>},<<"Invalid sender JID">>}