=== Test case: rest_SUITE:stanzas_are_sent_and_received/1 (click for source code)
=== Config value:
[{watchdog,<0.10444.2>},
{{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@43f5552376e6.2022-03-04_11.16.18/big_tests.tests.rest_SUITE.logs/run.2022-03-04_11.27.36/rest_suite.stanzas_are_sent_and_received.115971.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@43f5552376e6.2022-03-04_11.16.18/big_tests.tests.rest_SUITE.logs/run.2022-03-04_11.27.36/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@43f5552376e6.2022-03-04_11.16.18"
=== Started at 2022-03-04 11:27:36
*** User 2022-03-04 11:27:37.028 ***
alicE_stanzas_are_sent_and_received_1997@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-04 11:27:37.029 ***
alicE_stanzas_are_sent_and_received_1997@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='317b49bcc3af6eff' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-03-04 11:27:37.030 ***
alicE_stanzas_are_sent_and_received_1997@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>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-03-04 11:27:37.030 ***
alicE_stanzas_are_sent_and_received_1997@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX3N0YW56YXNfYXJlX3NlbnRfYW5kX3JlY2VpdmVkXzE5OTcAbWF0eWdyeXNh</auth>
*** User 2022-03-04 11:27:37.032 ***
alicE_stanzas_are_sent_and_received_1997@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2022-03-04 11:27:37.032 ***
alicE_stanzas_are_sent_and_received_1997@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-04 11:27:37.032 ***
alicE_stanzas_are_sent_and_received_1997@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='6a2272d3695bd3d4' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-03-04 11:27:37.032 ***
alicE_stanzas_are_sent_and_received_1997@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-04 11:27:37.033 ***
alicE_stanzas_are_sent_and_received_1997@localhost/res1 out
<iq type='set' id='c281f32eaf1f0a0fe5552965fb339c1c'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2022-03-04 11:27:37.033 ***
alicE_stanzas_are_sent_and_received_1997@localhost/res1 in
<iq id='c281f32eaf1f0a0fe5552965fb339c1c' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>alicE_stanzas_are_sent_and_received_1997@localhost/res1</jid>
</bind>
</iq>
*** User 2022-03-04 11:27:37.033 ***
alicE_stanzas_are_sent_and_received_1997@localhost/res1 out
<iq type='set' id='cbafae4673430264dc3baaf45a023e73'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-03-04 11:27:37.034 ***
alicE_stanzas_are_sent_and_received_1997@localhost/res1 in
<iq type='result' id='cbafae4673430264dc3baaf45a023e73'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-03-04 11:27:37.034 ***
alicE_stanzas_are_sent_and_received_1997@localhost/res1 out
<presence/>
*** User 2022-03-04 11:27:37.036 ***
alicE_stanzas_are_sent_and_received_1997@localhost/res1 in
<presence from='alicE_stanzas_are_sent_and_received_1997@localhost/res1' to='alice_stanzas_are_sent_and_received_1997@localhost/res1' xml:lang='en'/>
*** User 2022-03-04 11:27:37.037 ***
bOb_stanzas_are_sent_and_received_1997@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-04 11:27:37.038 ***
bOb_stanzas_are_sent_and_received_1997@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='f7d995982392d3fa' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-03-04 11:27:37.038 ***
bOb_stanzas_are_sent_and_received_1997@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>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-03-04 11:27:37.038 ***
bOb_stanzas_are_sent_and_received_1997@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9zdGFuemFzX2FyZV9zZW50X2FuZF9yZWNlaXZlZF8xOTk3AG1ha3JvbGlrYQ==</auth>
*** User 2022-03-04 11:27:37.047 ***
bOb_stanzas_are_sent_and_received_1997@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2022-03-04 11:27:37.047 ***
bOb_stanzas_are_sent_and_received_1997@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-04 11:27:37.048 ***
bOb_stanzas_are_sent_and_received_1997@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='4e9527129e207098' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-03-04 11:27:37.048 ***
bOb_stanzas_are_sent_and_received_1997@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-04 11:27:37.049 ***
bOb_stanzas_are_sent_and_received_1997@localhost/res1 out
<iq type='set' id='00a393cc91a8711192e9a601f1a7c3a8'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2022-03-04 11:27:37.049 ***
bOb_stanzas_are_sent_and_received_1997@localhost/res1 in
<iq id='00a393cc91a8711192e9a601f1a7c3a8' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>bOb_stanzas_are_sent_and_received_1997@localhost/res1</jid>
</bind>
</iq>
*** User 2022-03-04 11:27:37.049 ***
bOb_stanzas_are_sent_and_received_1997@localhost/res1 out
<iq type='set' id='5aecbb339d992604b2a8d18a050ab4f5'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-03-04 11:27:37.050 ***
bOb_stanzas_are_sent_and_received_1997@localhost/res1 in
<iq type='result' id='5aecbb339d992604b2a8d18a050ab4f5'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-03-04 11:27:37.050 ***
bOb_stanzas_are_sent_and_received_1997@localhost/res1 out
<presence/>
*** User 2022-03-04 11:27:37.053 ***
bOb_stanzas_are_sent_and_received_1997@localhost/res1 in
<presence from='bOb_stanzas_are_sent_and_received_1997@localhost/res1' to='bob_stanzas_are_sent_and_received_1997@localhost/res1' xml:lang='en'/>
*** User 2022-03-04 11:27:37.061 ***
REST request:
Code: 204
Req: {<0.10675.2>,<<"/api/stanzas">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"ffeaf54c8ce9cd21">>}],
<<"{\"stanza\":\"the bodyinside the sibling\"}">>}
Result: {{<<"204">>,<<"No Content">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Fri, 04 Mar 2022 11:27:36 GMT">>},
{<<"content-type">>,<<"application/json">>}],
<<>>,112,6803}
Params: #{body =>
<<"{\"stanza\":\"the bodyinside the sibling\"}">>,
method => <<"POST">>,path => <<"/api/stanzas">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-03-04 11:27:37.061 ***
bOb_stanzas_are_sent_and_received_1997@localhost/res1 in
<message from='alicE_stanzas_are_sent_and_received_1997@localhost/res1' to='bOb_stanzas_are_sent_and_received_1997@localhost/res1' extra='attribute'>
<body>the body</body>
<sibling>inside the sibling</sibling>
<stanza-id by='bOb_stanzas_are_sent_and_received_1997@localhost' id='BMB2PKVL4C01' xmlns='urn:xmpp:sid:0'/>
</message>
*** User 2022-03-04 11:27:37.061 ***
M: {xmlel,<<"message">>,
[{<<"from">>,
<<"alicE_stanzas_are_sent_and_received_1997@localhost/res1">>},
{<<"extra">>,<<"attribute">>}],
[{xmlel,<<"body">>,[],[{xmlcdata,<<"the body">>}]},
{xmlel,<<"sibling">>,[],[{xmlcdata,<<"inside the sibling">>}]}]}
*** User 2022-03-04 11:27:37.063 ***
REST request fails:
Code: 400
Req: {<0.10703.2>,<<"/api/stanzas">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"dc2e894239f1730f">>}],
<<"{\"stanza\":\"the bodyinside the sibling\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Fri, 04 Mar 2022 11:27:36 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"29">>}],
<<"both from and to are required">>,162,1025}
Params: #{body =>
<<"{\"stanza\":\"the bodyinside the sibling\"}">>,
method => <<"POST">>,path => <<"/api/stanzas">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-03-04 11:27:37.066 ***
REST request fails:
Code: 400
Req: {<0.10706.2>,<<"/api/stanzas">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"a7ae75047b96ae5e">>}],
<<"{\"stanza\":\"the body>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Fri, 04 Mar 2022 11:27:36 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"30">>}],
<<"Malformed stanza: \"expected >\"">>,163,2416}
Params: #{body =>
<<"{\"stanza\":\"the body>,
method => <<"POST">>,path => <<"/api/stanzas">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-03-04 11:27:37.066 ***
bOb_stanzas_are_sent_and_received_1997@localhost/res1 out
</stream:stream>
*** User 2022-03-04 11:27:37.067 ***
bOb_stanzas_are_sent_and_received_1997@localhost/res1 in
</stream:stream>
*** User 2022-03-04 11:27:37.067 ***
alicE_stanzas_are_sent_and_received_1997@localhost/res1 out
</stream:stream>
*** User 2022-03-04 11:27:37.069 ***
alicE_stanzas_are_sent_and_received_1997@localhost/res1 in
</stream:stream>
=== Ended at 2022-03-04 11:27:37
=== successfully completed test case
=== === Returned value: ok