=== Test case: rest_SUITE:stanzas_are_sent_and_received/1 (click for source code)
=== Config value:
[{watchdog,<0.7719.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,"odbc_mssql_mnesia"},
{tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@ebe8a8f9fc53.2022-01-25_16.21.59/big_tests.tests.rest_SUITE.logs/run.2022-01-25_16.34.19/rest_suite.stanzas_are_sent_and_received.118275.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@ebe8a8f9fc53.2022-01-25_16.21.59/big_tests.tests.rest_SUITE.logs/run.2022-01-25_16.34.19/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@ebe8a8f9fc53.2022-01-25_16.21.59"
=== Started at 2022-01-25 16:34:20
*** User 2022-01-25 16:34:20.073 ***
alicE_stanzas_are_sent_and_received_2208@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-01-25 16:34:20.076 ***
alicE_stanzas_are_sent_and_received_2208@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='f02daae6b7f999d9' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-01-25 16:34:20.076 ***
alicE_stanzas_are_sent_and_received_2208@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-01-25 16:34:20.076 ***
alicE_stanzas_are_sent_and_received_2208@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX3N0YW56YXNfYXJlX3NlbnRfYW5kX3JlY2VpdmVkXzIyMDgAbWF0eWdyeXNh</auth>
*** User 2022-01-25 16:34:20.078 ***
alicE_stanzas_are_sent_and_received_2208@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2022-01-25 16:34:20.079 ***
alicE_stanzas_are_sent_and_received_2208@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-01-25 16:34:20.079 ***
alicE_stanzas_are_sent_and_received_2208@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='c7e4c5fc46138bd7' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-01-25 16:34:20.079 ***
alicE_stanzas_are_sent_and_received_2208@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-01-25 16:34:20.079 ***
alicE_stanzas_are_sent_and_received_2208@localhost/res1 out
<iq type='set' id='dced058d0f706dd9aa4b920bcdcc5429'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2022-01-25 16:34:20.080 ***
alicE_stanzas_are_sent_and_received_2208@localhost/res1 in
<iq id='dced058d0f706dd9aa4b920bcdcc5429' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>alicE_stanzas_are_sent_and_received_2208@localhost/res1</jid>
</bind>
</iq>
*** User 2022-01-25 16:34:20.080 ***
alicE_stanzas_are_sent_and_received_2208@localhost/res1 out
<iq type='set' id='428b79c4fdf2108894bf56b84d759a3f'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-25 16:34:20.080 ***
alicE_stanzas_are_sent_and_received_2208@localhost/res1 in
<iq type='result' id='428b79c4fdf2108894bf56b84d759a3f'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-25 16:34:20.080 ***
alicE_stanzas_are_sent_and_received_2208@localhost/res1 out
<presence/>
*** User 2022-01-25 16:34:20.083 ***
alicE_stanzas_are_sent_and_received_2208@localhost/res1 in
<presence from='alicE_stanzas_are_sent_and_received_2208@localhost/res1' to='alice_stanzas_are_sent_and_received_2208@localhost/res1' xml:lang='en'/>
*** User 2022-01-25 16:34:20.084 ***
bOb_stanzas_are_sent_and_received_2208@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-01-25 16:34:20.085 ***
bOb_stanzas_are_sent_and_received_2208@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='9d2ef6a2ebe1c173' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-01-25 16:34:20.085 ***
bOb_stanzas_are_sent_and_received_2208@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-01-25 16:34:20.086 ***
bOb_stanzas_are_sent_and_received_2208@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9zdGFuemFzX2FyZV9zZW50X2FuZF9yZWNlaXZlZF8yMjA4AG1ha3JvbGlrYQ==</auth>
*** User 2022-01-25 16:34:20.087 ***
bOb_stanzas_are_sent_and_received_2208@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2022-01-25 16:34:20.087 ***
bOb_stanzas_are_sent_and_received_2208@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-01-25 16:34:20.087 ***
bOb_stanzas_are_sent_and_received_2208@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='bd1b2cf60c52b21a' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-01-25 16:34:20.087 ***
bOb_stanzas_are_sent_and_received_2208@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-01-25 16:34:20.088 ***
bOb_stanzas_are_sent_and_received_2208@localhost/res1 out
<iq type='set' id='b8b2b183be828e22d89469df2fcaac63'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2022-01-25 16:34:20.088 ***
bOb_stanzas_are_sent_and_received_2208@localhost/res1 in
<iq id='b8b2b183be828e22d89469df2fcaac63' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>bOb_stanzas_are_sent_and_received_2208@localhost/res1</jid>
</bind>
</iq>
*** User 2022-01-25 16:34:20.088 ***
bOb_stanzas_are_sent_and_received_2208@localhost/res1 out
<iq type='set' id='5155c651117072ed51b274e359241ab6'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-25 16:34:20.088 ***
bOb_stanzas_are_sent_and_received_2208@localhost/res1 in
<iq type='result' id='5155c651117072ed51b274e359241ab6'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-25 16:34:20.088 ***
bOb_stanzas_are_sent_and_received_2208@localhost/res1 out
<presence/>
*** User 2022-01-25 16:34:20.132 ***
bOb_stanzas_are_sent_and_received_2208@localhost/res1 in
<presence from='bOb_stanzas_are_sent_and_received_2208@localhost/res1' to='bob_stanzas_are_sent_and_received_2208@localhost/res1' xml:lang='en'/>
*** User 2022-01-25 16:34:20.156 ***
REST request:
Code: 204
Req: {<0.7931.2>,<<"/api/stanzas">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"2f0ed20dbcaa33d4">>}],
<<"{\"stanza\":\"the bodyinside the sibling\"}">>}
Result: {{<<"204">>,<<"No Content">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Tue, 25 Jan 2022 16:34:19 GMT">>},
{<<"content-type">>,<<"application/json">>}],
<<>>,112,22792}
Params: #{body =>
<<"{\"stanza\":\"the bodyinside the sibling\"}">>,
method => <<"POST">>,path => <<"/api/stanzas">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-01-25 16:34:20.156 ***
bOb_stanzas_are_sent_and_received_2208@localhost/res1 in
<message from='alicE_stanzas_are_sent_and_received_2208@localhost/res1' to='bOb_stanzas_are_sent_and_received_2208@localhost/res1' extra='attribute'>
<body>the body</body>
<sibling>inside the sibling</sibling>
<stanza-id by='bOb_stanzas_are_sent_and_received_2208@localhost' id='BLJAL0NU3N81' xmlns='urn:xmpp:sid:0'/>
</message>
*** User 2022-01-25 16:34:20.156 ***
M: {xmlel,<<"message">>,
[{<<"from">>,
<<"alicE_stanzas_are_sent_and_received_2208@localhost/res1">>},
{<<"extra">>,<<"attribute">>}],
[{xmlel,<<"body">>,[],[{xmlcdata,<<"the body">>}]},
{xmlel,<<"sibling">>,[],[{xmlcdata,<<"inside the sibling">>}]}]}
*** User 2022-01-25 16:34:20.157 ***
REST request fails:
Code: 400
Req: {<0.7984.2>,<<"/api/stanzas">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"59db3abb03378657">>}],
<<"{\"stanza\":\"the bodyinside the sibling\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Tue, 25 Jan 2022 16:34:19 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"29">>}],
<<"both from and to are required">>,162,553}
Params: #{body =>
<<"{\"stanza\":\"the bodyinside the sibling\"}">>,
method => <<"POST">>,path => <<"/api/stanzas">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-01-25 16:34:20.159 ***
REST request fails:
Code: 400
Req: {<0.7987.2>,<<"/api/stanzas">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"a6ca60589bca49e2">>}],
<<"{\"stanza\":\"the body>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Tue, 25 Jan 2022 16:34:19 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"30">>}],
<<"Malformed stanza: \"expected >\"">>,163,703}
Params: #{body =>
<<"{\"stanza\":\"the body>,
method => <<"POST">>,path => <<"/api/stanzas">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-01-25 16:34:20.159 ***
bOb_stanzas_are_sent_and_received_2208@localhost/res1 out
</stream:stream>
*** User 2022-01-25 16:34:20.159 ***
bOb_stanzas_are_sent_and_received_2208@localhost/res1 in
</stream:stream>
*** User 2022-01-25 16:34:20.159 ***
alicE_stanzas_are_sent_and_received_2208@localhost/res1 out
</stream:stream>
*** User 2022-01-25 16:34:20.159 ***
alicE_stanzas_are_sent_and_received_2208@localhost/res1 in
</stream:stream>
=== Ended at 2022-01-25 16:34:20
=== successfully completed test case
=== === Returned value: ok