=== Test case: rest_SUITE:messages_error_handling/1 (click for source code)
=== Config value:
[{watchdog,<0.25535.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,"pgsql_mnesia"},
{tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@7a520fcf4274.2022-02-02_15.07.36/big_tests.tests.rest_SUITE.logs/run.2022-02-02_15.14.56/rest_suite.messages_error_handling.67588.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@7a520fcf4274.2022-02-02_15.07.36/big_tests.tests.rest_SUITE.logs/run.2022-02-02_15.14.56/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@7a520fcf4274.2022-02-02_15.07.36"
=== Started at 2022-02-02 15:14:56
*** User 2022-02-02 15:14:56.953 ***
alicE_messages_error_handling_1601@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-02-02 15:14:56.954 ***
alicE_messages_error_handling_1601@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='0900be81dc56c5fe' from='domain.example.com' version='1.0' xml:lang='en'>
*** User 2022-02-02 15:14:56.955 ***
alicE_messages_error_handling_1601@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-02-02 15:14:56.955 ***
alicE_messages_error_handling_1601@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX21lc3NhZ2VzX2Vycm9yX2hhbmRsaW5nXzE2MDEAbWF0eWdyeXNh</auth>
*** User 2022-02-02 15:14:56.956 ***
alicE_messages_error_handling_1601@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2022-02-02 15:14:56.956 ***
alicE_messages_error_handling_1601@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-02-02 15:14:56.956 ***
alicE_messages_error_handling_1601@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='d69f479e1f8c1a81' from='domain.example.com' version='1.0' xml:lang='en'>
*** User 2022-02-02 15:14:56.956 ***
alicE_messages_error_handling_1601@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-02-02 15:14:56.956 ***
alicE_messages_error_handling_1601@domain.example.com/res1 out
<iq type='set' id='ab16a0584e81714ea4f3918d86acaa06'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2022-02-02 15:14:56.957 ***
alicE_messages_error_handling_1601@domain.example.com/res1 in
<iq id='ab16a0584e81714ea4f3918d86acaa06' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>alicE_messages_error_handling_1601@domain.example.com/res1</jid>
</bind>
</iq>
*** User 2022-02-02 15:14:56.957 ***
alicE_messages_error_handling_1601@domain.example.com/res1 out
<iq type='set' id='e872630c27273f26edbca92dd4ba42b6'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-02-02 15:14:56.957 ***
alicE_messages_error_handling_1601@domain.example.com/res1 in
<iq type='result' id='e872630c27273f26edbca92dd4ba42b6'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-02-02 15:14:56.957 ***
alicE_messages_error_handling_1601@domain.example.com/res1 out
<presence/>
*** User 2022-02-02 15:14:56.959 ***
alicE_messages_error_handling_1601@domain.example.com/res1 in
<presence from='alicE_messages_error_handling_1601@domain.example.com/res1' to='alice_messages_error_handling_1601@domain.example.com/res1' xml:lang='en'/>
*** User 2022-02-02 15:14:56.959 ***
bOb_messages_error_handling_1601@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-02-02 15:14:56.960 ***
bOb_messages_error_handling_1601@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='87be27e59c9b0b2a' from='domain.example.com' version='1.0' xml:lang='en'>
*** User 2022-02-02 15:14:56.960 ***
bOb_messages_error_handling_1601@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-02-02 15:14:56.960 ***
bOb_messages_error_handling_1601@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9tZXNzYWdlc19lcnJvcl9oYW5kbGluZ18xNjAxAG1ha3JvbGlrYQ==</auth>
*** User 2022-02-02 15:14:56.961 ***
bOb_messages_error_handling_1601@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2022-02-02 15:14:56.962 ***
bOb_messages_error_handling_1601@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-02-02 15:14:56.962 ***
bOb_messages_error_handling_1601@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='073cec69c6a62910' from='domain.example.com' version='1.0' xml:lang='en'>
*** User 2022-02-02 15:14:56.962 ***
bOb_messages_error_handling_1601@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-02-02 15:14:56.962 ***
bOb_messages_error_handling_1601@domain.example.com/res1 out
<iq type='set' id='7f2c152a832e2af5bd00f4218d7443cc'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2022-02-02 15:14:56.962 ***
bOb_messages_error_handling_1601@domain.example.com/res1 in
<iq id='7f2c152a832e2af5bd00f4218d7443cc' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>bOb_messages_error_handling_1601@domain.example.com/res1</jid>
</bind>
</iq>
*** User 2022-02-02 15:14:56.962 ***
bOb_messages_error_handling_1601@domain.example.com/res1 out
<iq type='set' id='2ab05fb72a40225ec8b54fb0a178219b'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-02-02 15:14:56.963 ***
bOb_messages_error_handling_1601@domain.example.com/res1 in
<iq type='result' id='2ab05fb72a40225ec8b54fb0a178219b'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-02-02 15:14:56.963 ***
bOb_messages_error_handling_1601@domain.example.com/res1 out
<presence/>
*** User 2022-02-02 15:14:56.965 ***
bOb_messages_error_handling_1601@domain.example.com/res1 in
<presence from='bOb_messages_error_handling_1601@domain.example.com/res1' to='bob_messages_error_handling_1601@domain.example.com/res1' xml:lang='en'/>
*** User 2022-02-02 15:14:56.967 ***
REST request fails:
Code: 400
Req: {<0.25744.1>,<<"/api/messages">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"3b3afae8432cb8b1">>}],
<<"{\"to\":\"@noway\",\"caller\":\"alice_messages_error_handling_1601@domain.example.com\",\"body\":\"whatever\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Wed, 02 Feb 2022 15:14:56 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"25">>}],
<<"Invalid jid: <<\"@noway\">>">>,158,1324}
Params: #{body =>
<<"{\"to\":\"@noway\",\"caller\":\"alice_messages_error_handling_1601@domain.example.com\",\"body\":\"whatever\"}">>,
method => <<"POST">>,path => <<"/api/messages">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-02-02 15:14:56.970 ***
REST request fails:
Code: 400
Req: {<0.25751.1>,<<"/api/messages">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"06a5f150bcd51c6a">>}],
<<"{\"to\":\"bob_messages_error_handling_1601@domain.example.com\",\"caller\":\"@noway\",\"body\":\"whatever\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Wed, 02 Feb 2022 15:14:56 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"25">>}],
<<"Invalid jid: <<\"@noway\">>">>,158,1016}
Params: #{body =>
<<"{\"to\":\"bob_messages_error_handling_1601@domain.example.com\",\"caller\":\"@noway\",\"body\":\"whatever\"}">>,
method => <<"POST">>,path => <<"/api/messages">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-02-02 15:14:56.970 ***
bOb_messages_error_handling_1601@domain.example.com/res1 out
</stream:stream>
*** User 2022-02-02 15:14:56.971 ***
bOb_messages_error_handling_1601@domain.example.com/res1 in
</stream:stream>
*** User 2022-02-02 15:14:56.971 ***
alicE_messages_error_handling_1601@domain.example.com/res1 out
</stream:stream>
*** User 2022-02-02 15:14:56.971 ***
alicE_messages_error_handling_1601@domain.example.com/res1 in
</stream:stream>
=== Ended at 2022-02-02 15:14:56
=== successfully completed test case
=== === Returned value: ok