=== Test case: rest_SUITE:stanzas_are_sent_and_received/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.stanzas_are_sent_and_received.68738.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_stanzas_are_sent_and_received_1285@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_stanzas_are_sent_and_received_1285@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='c62ed822bf650f03' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-03-03 10:38:08.254 ***
alicE_stanzas_are_sent_and_received_1285@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.255 ***
alicE_stanzas_are_sent_and_received_1285@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX3N0YW56YXNfYXJlX3NlbnRfYW5kX3JlY2VpdmVkXzEyODUAbWF0eWdyeXNh</auth>
*** User 2022-03-03 10:38:08.256 ***
alicE_stanzas_are_sent_and_received_1285@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2022-03-03 10:38:08.256 ***
alicE_stanzas_are_sent_and_received_1285@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_stanzas_are_sent_and_received_1285@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='172f7050b8fa2f8f' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-03-03 10:38:08.257 ***
alicE_stanzas_are_sent_and_received_1285@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.257 ***
alicE_stanzas_are_sent_and_received_1285@localhost/res1 out
<iq type='set' id='8298bdc370625609fc8ab62ca4e1b05c'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2022-03-03 10:38:08.257 ***
alicE_stanzas_are_sent_and_received_1285@localhost/res1 in
<iq id='8298bdc370625609fc8ab62ca4e1b05c' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>alicE_stanzas_are_sent_and_received_1285@localhost/res1</jid>
</bind>
</iq>
*** User 2022-03-03 10:38:08.257 ***
alicE_stanzas_are_sent_and_received_1285@localhost/res1 out
<iq type='set' id='0f83b423c8ca11ae25a50d26af81ffcf'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-03-03 10:38:08.257 ***
alicE_stanzas_are_sent_and_received_1285@localhost/res1 in
<iq type='result' id='0f83b423c8ca11ae25a50d26af81ffcf'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-03-03 10:38:08.258 ***
alicE_stanzas_are_sent_and_received_1285@localhost/res1 out
<presence/>
*** User 2022-03-03 10:38:08.258 ***
alicE_stanzas_are_sent_and_received_1285@localhost/res1 in
<presence from='alicE_stanzas_are_sent_and_received_1285@localhost/res1' to='alice_stanzas_are_sent_and_received_1285@localhost/res1' xml:lang='en'/>
*** User 2022-03-03 10:38:08.259 ***
bOb_stanzas_are_sent_and_received_1285@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_stanzas_are_sent_and_received_1285@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='6e6e6cdf4d3e2608' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-03-03 10:38:08.259 ***
bOb_stanzas_are_sent_and_received_1285@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.259 ***
bOb_stanzas_are_sent_and_received_1285@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9zdGFuemFzX2FyZV9zZW50X2FuZF9yZWNlaXZlZF8xMjg1AG1ha3JvbGlrYQ==</auth>
*** User 2022-03-03 10:38:08.261 ***
bOb_stanzas_are_sent_and_received_1285@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2022-03-03 10:38:08.261 ***
bOb_stanzas_are_sent_and_received_1285@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.261 ***
bOb_stanzas_are_sent_and_received_1285@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='044de9487636287b' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-03-03 10:38:08.261 ***
bOb_stanzas_are_sent_and_received_1285@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.261 ***
bOb_stanzas_are_sent_and_received_1285@localhost/res1 out
<iq type='set' id='2f6e3a64c359ff9ea494a234fb6f9782'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2022-03-03 10:38:08.262 ***
bOb_stanzas_are_sent_and_received_1285@localhost/res1 in
<iq id='2f6e3a64c359ff9ea494a234fb6f9782' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>bOb_stanzas_are_sent_and_received_1285@localhost/res1</jid>
</bind>
</iq>
*** User 2022-03-03 10:38:08.262 ***
bOb_stanzas_are_sent_and_received_1285@localhost/res1 out
<iq type='set' id='b3996fe19102a60906f39aa7ac7b9861'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-03-03 10:38:08.262 ***
bOb_stanzas_are_sent_and_received_1285@localhost/res1 in
<iq type='result' id='b3996fe19102a60906f39aa7ac7b9861'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-03-03 10:38:08.263 ***
bOb_stanzas_are_sent_and_received_1285@localhost/res1 out
<presence/>
*** User 2022-03-03 10:38:08.263 ***
bOb_stanzas_are_sent_and_received_1285@localhost/res1 in
<presence from='bOb_stanzas_are_sent_and_received_1285@localhost/res1' to='bob_stanzas_are_sent_and_received_1285@localhost/res1' xml:lang='en'/>
*** User 2022-03-03 10:38:08.265 ***
REST request:
Code: 204
Req: {<0.14095.1>,<<"/api/stanzas">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"8a09e4e8c8a655b3">>}],
<<"{\"stanza\":\"the bodyinside the sibling\"}">>}
Result: {{<<"204">>,<<"No Content">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 03 Mar 2022 10:38:07 GMT">>},
{<<"content-type">>,<<"application/json">>}],
<<>>,112,612}
Params: #{body =>
<<"{\"stanza\":\"the bodyinside the sibling\"}">>,
method => <<"POST">>,path => <<"/api/stanzas">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-03-03 10:38:08.265 ***
bOb_stanzas_are_sent_and_received_1285@localhost/res1 in
<message from='alicE_stanzas_are_sent_and_received_1285@localhost/res1' to='bOb_stanzas_are_sent_and_received_1285@localhost/res1' extra='attribute'>
<body>the body</body>
<sibling>inside the sibling</sibling>
</message>
*** User 2022-03-03 10:38:08.265 ***
M: {xmlel,<<"message">>,
[{<<"from">>,
<<"alicE_stanzas_are_sent_and_received_1285@localhost/res1">>},
{<<"extra">>,<<"attribute">>}],
[{xmlel,<<"body">>,[],[{xmlcdata,<<"the body">>}]},
{xmlel,<<"sibling">>,[],[{xmlcdata,<<"inside the sibling">>}]}]}
*** User 2022-03-03 10:38:08.267 ***
REST request fails:
Code: 400
Req: {<0.14106.1>,<<"/api/stanzas">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"f2e66b81debbbb36">>}],
<<"{\"stanza\":\"the bodyinside the sibling\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 03 Mar 2022 10:38:07 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"29">>}],
<<"both from and to are required">>,162,783}
Params: #{body =>
<<"{\"stanza\":\"the bodyinside the sibling\"}">>,
method => <<"POST">>,path => <<"/api/stanzas">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-03-03 10:38:08.269 ***
REST request fails:
Code: 400
Req: {<0.14119.1>,<<"/api/stanzas">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"1869826fc8b79058">>}],
<<"{\"stanza\":\"the body>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 03 Mar 2022 10:38:07 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"30">>}],
<<"Malformed stanza: \"expected >\"">>,163,852}
Params: #{body =>
<<"{\"stanza\":\"the body>,
method => <<"POST">>,path => <<"/api/stanzas">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-03-03 10:38:08.269 ***
bOb_stanzas_are_sent_and_received_1285@localhost/res1 out
</stream:stream>
*** User 2022-03-03 10:38:08.270 ***
bOb_stanzas_are_sent_and_received_1285@localhost/res1 in
</stream:stream>
*** User 2022-03-03 10:38:08.270 ***
alicE_stanzas_are_sent_and_received_1285@localhost/res1 out
</stream:stream>
*** User 2022-03-03 10:38:08.270 ***
alicE_stanzas_are_sent_and_received_1285@localhost/res1 in
</stream:stream>
=== Ended at 2022-03-03 10:38:08
=== successfully completed test case
=== === Returned value: ok