=== Test case: rest_SUITE:messages_error_handling/1 (click for source code)
=== Config value:
[{watchdog,<0.24874.1>},
{{ejabberd_cwd,mongooseim@localhost},
"/home/circleci/project/_build/mim1/rel/mongooseim"},
{mam_backend,rdbms},
{mim_data_dir,"/home/circleci/project/big_tests/tests/rest_SUITE_data"},
{preset,"odbc_mssql_mnesia"},
{tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@998557c7e1d1.2022-01-27_12.27.57/big_tests.tests.rest_SUITE.logs/run.2022-01-27_12.36.31/rest_suite.messages_error_handling.121218.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@998557c7e1d1.2022-01-27_12.27.57/big_tests.tests.rest_SUITE.logs/run.2022-01-27_12.36.31/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">>}]}]}]
=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@998557c7e1d1.2022-01-27_12.27.57"
=== Started at 2022-01-27 12:36:31
*** User 2022-01-27 12:36:31.334 ***
alicE_messages_error_handling_1732@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2022-01-27 12:36:31.334 ***
alicE_messages_error_handling_1732@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='01f85167f739a06e' from='domain.example.com' version='1.0' xml:lang='en'>
*** User 2022-01-27 12:36:31.335 ***
alicE_messages_error_handling_1732@domain.example.com/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>SCRAM-SHA-256</mechanism>
<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-01-27 12:36:31.335 ***
alicE_messages_error_handling_1732@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX21lc3NhZ2VzX2Vycm9yX2hhbmRsaW5nXzE3MzIAbWF0eWdyeXNh</auth>
*** User 2022-01-27 12:36:31.337 ***
alicE_messages_error_handling_1732@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2022-01-27 12:36:31.338 ***
alicE_messages_error_handling_1732@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2022-01-27 12:36:31.338 ***
alicE_messages_error_handling_1732@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='b14db7fca8b499f9' from='domain.example.com' version='1.0' xml:lang='en'>
*** User 2022-01-27 12:36:31.338 ***
alicE_messages_error_handling_1732@domain.example.com/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-01-27 12:36:31.339 ***
alicE_messages_error_handling_1732@domain.example.com/res1 out
<iq type='set' id='16cc757f6e3a1e1770f54dd7fafd121e'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2022-01-27 12:36:31.339 ***
alicE_messages_error_handling_1732@domain.example.com/res1 in
<iq id='16cc757f6e3a1e1770f54dd7fafd121e' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>alicE_messages_error_handling_1732@domain.example.com/res1</jid>
</bind>
</iq>
*** User 2022-01-27 12:36:31.339 ***
alicE_messages_error_handling_1732@domain.example.com/res1 out
<iq type='set' id='1c6371cd0f4b96047d47bb3b112022fa'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-27 12:36:31.339 ***
alicE_messages_error_handling_1732@domain.example.com/res1 in
<iq type='result' id='1c6371cd0f4b96047d47bb3b112022fa'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-27 12:36:31.340 ***
alicE_messages_error_handling_1732@domain.example.com/res1 out
<presence/>
*** User 2022-01-27 12:36:31.345 ***
alicE_messages_error_handling_1732@domain.example.com/res1 in
<presence from='alicE_messages_error_handling_1732@domain.example.com/res1' to='alice_messages_error_handling_1732@domain.example.com/res1' xml:lang='en'/>
*** User 2022-01-27 12:36:31.346 ***
bOb_messages_error_handling_1732@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2022-01-27 12:36:31.346 ***
bOb_messages_error_handling_1732@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='d233ef31a9980f0a' from='domain.example.com' version='1.0' xml:lang='en'>
*** User 2022-01-27 12:36:31.346 ***
bOb_messages_error_handling_1732@domain.example.com/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>SCRAM-SHA-256</mechanism>
<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-01-27 12:36:31.347 ***
bOb_messages_error_handling_1732@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9tZXNzYWdlc19lcnJvcl9oYW5kbGluZ18xNzMyAG1ha3JvbGlrYQ==</auth>
*** User 2022-01-27 12:36:31.348 ***
bOb_messages_error_handling_1732@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2022-01-27 12:36:31.348 ***
bOb_messages_error_handling_1732@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2022-01-27 12:36:31.349 ***
bOb_messages_error_handling_1732@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='ed05f4b99c5f6325' from='domain.example.com' version='1.0' xml:lang='en'>
*** User 2022-01-27 12:36:31.349 ***
bOb_messages_error_handling_1732@domain.example.com/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-01-27 12:36:31.349 ***
bOb_messages_error_handling_1732@domain.example.com/res1 out
<iq type='set' id='cc4bf38a1bf199d272105ae7ddb29084'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2022-01-27 12:36:31.350 ***
bOb_messages_error_handling_1732@domain.example.com/res1 in
<iq id='cc4bf38a1bf199d272105ae7ddb29084' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>bOb_messages_error_handling_1732@domain.example.com/res1</jid>
</bind>
</iq>
*** User 2022-01-27 12:36:31.350 ***
bOb_messages_error_handling_1732@domain.example.com/res1 out
<iq type='set' id='d7bf9c964d0a87a0072f9461613b7091'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-27 12:36:31.352 ***
bOb_messages_error_handling_1732@domain.example.com/res1 in
<iq type='result' id='d7bf9c964d0a87a0072f9461613b7091'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-27 12:36:31.352 ***
bOb_messages_error_handling_1732@domain.example.com/res1 out
<presence/>
*** User 2022-01-27 12:36:31.358 ***
bOb_messages_error_handling_1732@domain.example.com/res1 in
<presence from='bOb_messages_error_handling_1732@domain.example.com/res1' to='bob_messages_error_handling_1732@domain.example.com/res1' xml:lang='en'/>
*** User 2022-01-27 12:36:31.362 ***
REST request fails:
Code: 400
Req: {<0.25092.1>,<<"/api/messages">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"753b7e375c8ff3e3">>}],
<<"{\"to\":\"@noway\",\"caller\":\"alice_messages_error_handling_1732@domain.example.com\",\"body\":\"whatever\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 27 Jan 2022 12:36:31 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"25">>}],
<<"Invalid jid: <<\"@noway\">>">>,158,1818}
Params: #{body =>
<<"{\"to\":\"@noway\",\"caller\":\"alice_messages_error_handling_1732@domain.example.com\",\"body\":\"whatever\"}">>,
method => <<"POST">>,path => <<"/api/messages">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-01-27 12:36:31.366 ***
REST request fails:
Code: 400
Req: {<0.25101.1>,<<"/api/messages">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"b14eb797ddfbdc1b">>}],
<<"{\"to\":\"bob_messages_error_handling_1732@domain.example.com\",\"caller\":\"@noway\",\"body\":\"whatever\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 27 Jan 2022 12:36:31 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"25">>}],
<<"Invalid jid: <<\"@noway\">>">>,158,1500}
Params: #{body =>
<<"{\"to\":\"bob_messages_error_handling_1732@domain.example.com\",\"caller\":\"@noway\",\"body\":\"whatever\"}">>,
method => <<"POST">>,path => <<"/api/messages">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-01-27 12:36:31.366 ***
bOb_messages_error_handling_1732@domain.example.com/res1 out
</stream:stream>
*** User 2022-01-27 12:36:31.367 ***
bOb_messages_error_handling_1732@domain.example.com/res1 in
</stream:stream>
*** User 2022-01-27 12:36:31.367 ***
alicE_messages_error_handling_1732@domain.example.com/res1 out
</stream:stream>
*** User 2022-01-27 12:36:31.367 ***
alicE_messages_error_handling_1732@domain.example.com/res1 in
</stream:stream>
=== Ended at 2022-01-27 12:36:31
=== successfully completed test case
=== === Returned value: ok