=== Test case: muc_http_api_SUITE:message_errors/1 (click for source code)
=== Config value:
[{watchdog,<0.2389.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@a458c4eb991a.2024-03-07_11.00.02/big_tests.tests.muc_http_api_SUITE.logs/run.2024-03-07_11.12.08/muc_http_api_suite.message_errors.216706.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@a458c4eb991a.2024-03-07_11.00.02/big_tests.tests.muc_http_api_SUITE.logs/run.2024-03-07_11.12.08/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@a458c4eb991a.2024-03-07_11.00.02"
=== Started at 2024-03-07 11:12:13
*** User 2024-03-07 11:12:13.725 ***🔗
REST request:
Code: 201
Req: {<0.2430.2>,<<"/api/mucs/domain.example.com">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"2c3d3c9955843457">>}],
<<"{\"owner\":\"alicE_message_errors_2806@domain.example.com\",\"nick\":\"ali\",\"name\":\"wonderland-33.718178\"}">>}
Result: {{<<"201">>,<<"Created">>},
[{<<"server">>,<<"Cowboy">>},
{<<"location">>,
<<"http://localhost:8088/api/mucs/domain.example.com/wonderland-33.718178">>},
{<<"date">>,<<"Thu, 07 Mar 2024 11:12:13 GMT">>},
{<<"content-type">>,<<"text/html">>},
{<<"content-length">>,<<"20">>}],
<<"wonderland-33.718178">>,224,2186}
Params: #{body =>
<<"{\"owner\":\"alicE_message_errors_2806@domain.example.com\",\"nick\":\"ali\",\"name\":\"wonderland-33.718178\"}">>,
method => <<"POST">>,path => <<"/api/mucs/domain.example.com">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2024-03-07 11:12:13.727 ***🔗
REST request:
Code: 204
Req: {<0.2440.2>,
<<"/api/mucs/domain.example.com/thisroomdoesnotexist/messages">>,
<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"8bc753f7cda1fbe4">>}],
<<"{\"from\":\"alicE_message_errors_2806@domain.example.com\",\"body\":\"Greetings!\"}">>}
Result: {{<<"204">>,<<"No Content">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 07 Mar 2024 11:12:13 GMT">>}],
<<>>,80,862}
Params: #{body =>
<<"{\"from\":\"alicE_message_errors_2806@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-03-07 11:12:13.729 ***🔗
REST request fails:
Code: 400
Req: {<0.2448.2>,
<<"/api/mucs/domain.example.com/wonderland-33.718178/messages">>,
<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"45ac47519e5cd854">>}],
<<"{\"from\":\"alicE_message_errors_2806@domain.example.com\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 07 Mar 2024 11:12:13 GMT">>},
{<<"content-type">>,<<"text/html">>},
{<<"content-length">>,<<"22">>}],
<<"\"Missing message body\"">>,148,487}
Params: #{body =>
<<"{\"from\":\"alicE_message_errors_2806@domain.example.com\"}">>,
method => <<"POST">>,
path =>
<<"/api/mucs/domain.example.com/wonderland-33.718178/messages">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2024-03-07 11:12:13.730 ***🔗
REST request fails:
Code: 400
Req: {<0.2457.2>,
<<"/api/mucs/domain.example.com/wonderland-33.718178/messages">>,
<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"29ce86a2034d802b">>}],
<<"{\"body\":\"Greetings!\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 07 Mar 2024 11:12:13 GMT">>},
{<<"content-type">>,<<"text/html">>},
{<<"content-length">>,<<"20">>}],
<<"\"Missing sender JID\"">>,146,723}
Params: #{body => <<"{\"body\":\"Greetings!\"}">>,method => <<"POST">>,
path =>
<<"/api/mucs/domain.example.com/wonderland-33.718178/messages">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2024-03-07 11:12:13.731 ***🔗
REST request fails:
Code: 400
Req: {<0.2463.2>,
<<"/api/mucs/domain.example.com/wonderland-33.718178/messages">>,
<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"7a020735f2934dc8">>}],
<<"{\"from\":\"@invalid\",\"body\":\"Greetings!\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 07 Mar 2024 11:12:13 GMT">>},
{<<"content-type">>,<<"text/html">>},
{<<"content-length">>,<<"20">>}],
<<"\"Invalid sender JID\"">>,146,486}
Params: #{body => <<"{\"from\":\"@invalid\",\"body\":\"Greetings!\"}">>,
method => <<"POST">>,
path =>
<<"/api/mucs/domain.example.com/wonderland-33.718178/messages">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
=== Ended at 2024-03-07 11:12:13
=== successfully completed test case
=== === Returned value: {{<<"400">>,<<"Bad Request">>},<<"Invalid sender JID">>}