=== Test case: rest_SUITE:messages_error_handling/1 (click for source code)
=== Config value:
[{watchdog,<0.13879.1>},
{{ejabberd_cwd,mongooseim@localhost},
"/home/circleci/project/_build/mim1/rel/mongooseim"},
{mam_backend,disabled},
{mim_data_dir,"/home/circleci/project/big_tests/tests/rest_SUITE_data"},
{preset,"ldap_mnesia"},
{tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@12130b74fc81.2022-03-03_10.28.39/big_tests.tests.rest_SUITE.logs/run.2022-03-03_10.38.08/rest_suite.messages_error_handling.52611.html"},
{tc_group_properties,[{name,admin},parallel]},
{tc_group_path,[]},
{data_dir,"/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/rest_SUITE_data/"},
{priv_dir,"/home/circleci/project/big_tests/ct_report/ct_run.test@12130b74fc81.2022-03-03_10.28.39/big_tests.tests.rest_SUITE.logs/run.2022-03-03_10.38.08/log_private/"},
{escalus_users,[{alice,[{username,<<"alicE">>},
{server,<<"localhost">>},
{password,<<"matygrysa">>}]},
{bob,[{username,<<"bOb">>},
{server,<<"localhost">>},
{password,<<"makrolika">>}]}]}]
=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@12130b74fc81.2022-03-03_10.28.39"
=== Started at 2022-03-03 10:38:08
*** User 2022-03-03 10:38:08.254 ***
alicE_messages_error_handling_1284@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2022-03-03 10:38:08.254 ***
alicE_messages_error_handling_1284@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='3d7b6a41076213cb' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-03-03 10:38:08.254 ***
alicE_messages_error_handling_1284@localhost/res1 in
<stream:features>
<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
<compression xmlns='http://jabber.org/features/compress'>
<method>zlib</method>
</compression>
<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
<mechanism>PLAIN</mechanism>
</mechanisms>
<register xmlns='http://jabber.org/features/iq-register'/>
<amp xmlns='http://jabber.org/feature/amp'/>
<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>
*** User 2022-03-03 10:38:08.254 ***
alicE_messages_error_handling_1284@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX21lc3NhZ2VzX2Vycm9yX2hhbmRsaW5nXzEyODQAbWF0eWdyeXNh</auth>
*** User 2022-03-03 10:38:08.256 ***
alicE_messages_error_handling_1284@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2022-03-03 10:38:08.256 ***
alicE_messages_error_handling_1284@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2022-03-03 10:38:08.256 ***
alicE_messages_error_handling_1284@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='4302dbb10c47cee8' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-03-03 10:38:08.256 ***
alicE_messages_error_handling_1284@localhost/res1 in
<stream:features>
<compression xmlns='http://jabber.org/features/compress'>
<method>zlib</method>
</compression>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
<register xmlns='http://jabber.org/features/iq-register'/>
<amp xmlns='http://jabber.org/feature/amp'/>
<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>
*** User 2022-03-03 10:38:08.256 ***
alicE_messages_error_handling_1284@localhost/res1 out
<iq type='set' id='47bb04d043c4394f288be34ed03dfdc7'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2022-03-03 10:38:08.257 ***
alicE_messages_error_handling_1284@localhost/res1 in
<iq id='47bb04d043c4394f288be34ed03dfdc7' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>alicE_messages_error_handling_1284@localhost/res1</jid>
</bind>
</iq>
*** User 2022-03-03 10:38:08.257 ***
alicE_messages_error_handling_1284@localhost/res1 out
<iq type='set' id='9df1345500962f9ba291fb3772a6ea36'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-03-03 10:38:08.257 ***
alicE_messages_error_handling_1284@localhost/res1 in
<iq type='result' id='9df1345500962f9ba291fb3772a6ea36'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-03-03 10:38:08.257 ***
alicE_messages_error_handling_1284@localhost/res1 out
<presence/>
*** User 2022-03-03 10:38:08.258 ***
alicE_messages_error_handling_1284@localhost/res1 in
<presence from='alicE_messages_error_handling_1284@localhost/res1' to='alice_messages_error_handling_1284@localhost/res1' xml:lang='en'/>
*** User 2022-03-03 10:38:08.259 ***
bOb_messages_error_handling_1284@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2022-03-03 10:38:08.259 ***
bOb_messages_error_handling_1284@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='fac6e4eda919ff58' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-03-03 10:38:08.259 ***
bOb_messages_error_handling_1284@localhost/res1 in
<stream:features>
<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
<compression xmlns='http://jabber.org/features/compress'>
<method>zlib</method>
</compression>
<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
<mechanism>PLAIN</mechanism>
</mechanisms>
<register xmlns='http://jabber.org/features/iq-register'/>
<amp xmlns='http://jabber.org/feature/amp'/>
<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>
*** User 2022-03-03 10:38:08.260 ***
bOb_messages_error_handling_1284@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9tZXNzYWdlc19lcnJvcl9oYW5kbGluZ18xMjg0AG1ha3JvbGlrYQ==</auth>
*** User 2022-03-03 10:38:08.261 ***
bOb_messages_error_handling_1284@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2022-03-03 10:38:08.261 ***
bOb_messages_error_handling_1284@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2022-03-03 10:38:08.262 ***
bOb_messages_error_handling_1284@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='d6fd2d32fac90c14' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-03-03 10:38:08.262 ***
bOb_messages_error_handling_1284@localhost/res1 in
<stream:features>
<compression xmlns='http://jabber.org/features/compress'>
<method>zlib</method>
</compression>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
<register xmlns='http://jabber.org/features/iq-register'/>
<amp xmlns='http://jabber.org/feature/amp'/>
<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>
*** User 2022-03-03 10:38:08.262 ***
bOb_messages_error_handling_1284@localhost/res1 out
<iq type='set' id='d00b090c20bbb0b4db5e5f437f011fdd'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2022-03-03 10:38:08.262 ***
bOb_messages_error_handling_1284@localhost/res1 in
<iq id='d00b090c20bbb0b4db5e5f437f011fdd' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>bOb_messages_error_handling_1284@localhost/res1</jid>
</bind>
</iq>
*** User 2022-03-03 10:38:08.263 ***
bOb_messages_error_handling_1284@localhost/res1 out
<iq type='set' id='d0dc08099bc329de73dcf5fce2ad73c1'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-03-03 10:38:08.263 ***
bOb_messages_error_handling_1284@localhost/res1 in
<iq type='result' id='d0dc08099bc329de73dcf5fce2ad73c1'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-03-03 10:38:08.263 ***
bOb_messages_error_handling_1284@localhost/res1 out
<presence/>
*** User 2022-03-03 10:38:08.264 ***
bOb_messages_error_handling_1284@localhost/res1 in
<presence from='bOb_messages_error_handling_1284@localhost/res1' to='bob_messages_error_handling_1284@localhost/res1' xml:lang='en'/>
*** User 2022-03-03 10:38:08.266 ***
REST request fails:
Code: 400
Req: {<0.14101.1>,<<"/api/messages">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"3e5341dd36110602">>}],
<<"{\"to\":\"@noway\",\"caller\":\"alice_messages_error_handling_1284@localhost\",\"body\":\"whatever\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 03 Mar 2022 10:38:07 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"25">>}],
<<"Invalid jid: <<\"@noway\">>">>,158,1092}
Params: #{body =>
<<"{\"to\":\"@noway\",\"caller\":\"alice_messages_error_handling_1284@localhost\",\"body\":\"whatever\"}">>,
method => <<"POST">>,path => <<"/api/messages">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-03-03 10:38:08.268 ***
REST request fails:
Code: 400
Req: {<0.14110.1>,<<"/api/messages">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"947e6f60ffa781e8">>}],
<<"{\"to\":\"bob_messages_error_handling_1284@localhost\",\"caller\":\"@noway\",\"body\":\"whatever\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 03 Mar 2022 10:38:07 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"25">>}],
<<"Invalid jid: <<\"@noway\">>">>,158,693}
Params: #{body =>
<<"{\"to\":\"bob_messages_error_handling_1284@localhost\",\"caller\":\"@noway\",\"body\":\"whatever\"}">>,
method => <<"POST">>,path => <<"/api/messages">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-03-03 10:38:08.268 ***
bOb_messages_error_handling_1284@localhost/res1 out
</stream:stream>
*** User 2022-03-03 10:38:08.268 ***
bOb_messages_error_handling_1284@localhost/res1 in
</stream:stream>
*** User 2022-03-03 10:38:08.268 ***
alicE_messages_error_handling_1284@localhost/res1 out
</stream:stream>
*** User 2022-03-03 10:38:08.269 ***
alicE_messages_error_handling_1284@localhost/res1 in
</stream:stream>
=== Ended at 2022-03-03 10:38:08
=== successfully completed test case
=== === Returned value: ok