=== Test case: rest_SUITE:stanzas_are_sent_and_received/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.stanzas_are_sent_and_received.102403.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.956 ***
alicE_stanzas_are_sent_and_received_1603@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.957 ***
alicE_stanzas_are_sent_and_received_1603@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='b4e343b3d6fbbac1' from='domain.example.com' version='1.0' xml:lang='en'>
*** User 2022-02-02 15:14:56.957 ***
alicE_stanzas_are_sent_and_received_1603@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.957 ***
alicE_stanzas_are_sent_and_received_1603@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX3N0YW56YXNfYXJlX3NlbnRfYW5kX3JlY2VpdmVkXzE2MDMAbWF0eWdyeXNh</auth>
*** User 2022-02-02 15:14:56.959 ***
alicE_stanzas_are_sent_and_received_1603@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2022-02-02 15:14:56.959 ***
alicE_stanzas_are_sent_and_received_1603@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.959 ***
alicE_stanzas_are_sent_and_received_1603@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='06093e0f17a3e319' from='domain.example.com' version='1.0' xml:lang='en'>
*** User 2022-02-02 15:14:56.959 ***
alicE_stanzas_are_sent_and_received_1603@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.959 ***
alicE_stanzas_are_sent_and_received_1603@domain.example.com/res1 out
<iq type='set' id='97ab51892434f272ca3d61491cad6d44'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2022-02-02 15:14:56.959 ***
alicE_stanzas_are_sent_and_received_1603@domain.example.com/res1 in
<iq id='97ab51892434f272ca3d61491cad6d44' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>alicE_stanzas_are_sent_and_received_1603@domain.example.com/res1</jid>
</bind>
</iq>
*** User 2022-02-02 15:14:56.960 ***
alicE_stanzas_are_sent_and_received_1603@domain.example.com/res1 out
<iq type='set' id='98a224bffc51f1df3402231900af0578'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-02-02 15:14:56.960 ***
alicE_stanzas_are_sent_and_received_1603@domain.example.com/res1 in
<iq type='result' id='98a224bffc51f1df3402231900af0578'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-02-02 15:14:56.960 ***
alicE_stanzas_are_sent_and_received_1603@domain.example.com/res1 out
<presence/>
*** User 2022-02-02 15:14:56.962 ***
alicE_stanzas_are_sent_and_received_1603@domain.example.com/res1 in
<presence from='alicE_stanzas_are_sent_and_received_1603@domain.example.com/res1' to='alice_stanzas_are_sent_and_received_1603@domain.example.com/res1' xml:lang='en'/>
*** User 2022-02-02 15:14:56.962 ***
bOb_stanzas_are_sent_and_received_1603@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.963 ***
bOb_stanzas_are_sent_and_received_1603@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='009d8d16da1368f3' from='domain.example.com' version='1.0' xml:lang='en'>
*** User 2022-02-02 15:14:56.963 ***
bOb_stanzas_are_sent_and_received_1603@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.963 ***
bOb_stanzas_are_sent_and_received_1603@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9zdGFuemFzX2FyZV9zZW50X2FuZF9yZWNlaXZlZF8xNjAzAG1ha3JvbGlrYQ==</auth>
*** User 2022-02-02 15:14:56.965 ***
bOb_stanzas_are_sent_and_received_1603@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2022-02-02 15:14:56.965 ***
bOb_stanzas_are_sent_and_received_1603@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.965 ***
bOb_stanzas_are_sent_and_received_1603@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='18512ef9fa5a63a0' from='domain.example.com' version='1.0' xml:lang='en'>
*** User 2022-02-02 15:14:56.965 ***
bOb_stanzas_are_sent_and_received_1603@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.966 ***
bOb_stanzas_are_sent_and_received_1603@domain.example.com/res1 out
<iq type='set' id='d451fe9b787169d9b9f1ee9953b02da1'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2022-02-02 15:14:56.966 ***
bOb_stanzas_are_sent_and_received_1603@domain.example.com/res1 in
<iq id='d451fe9b787169d9b9f1ee9953b02da1' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>bOb_stanzas_are_sent_and_received_1603@domain.example.com/res1</jid>
</bind>
</iq>
*** User 2022-02-02 15:14:56.966 ***
bOb_stanzas_are_sent_and_received_1603@domain.example.com/res1 out
<iq type='set' id='fc7b8cfd646a935696e7048301c54b20'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-02-02 15:14:56.967 ***
bOb_stanzas_are_sent_and_received_1603@domain.example.com/res1 in
<iq type='result' id='fc7b8cfd646a935696e7048301c54b20'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-02-02 15:14:56.967 ***
bOb_stanzas_are_sent_and_received_1603@domain.example.com/res1 out
<presence/>
*** User 2022-02-02 15:14:56.969 ***
bOb_stanzas_are_sent_and_received_1603@domain.example.com/res1 in
<presence from='bOb_stanzas_are_sent_and_received_1603@domain.example.com/res1' to='bob_stanzas_are_sent_and_received_1603@domain.example.com/res1' xml:lang='en'/>
*** User 2022-02-02 15:14:56.978 ***
REST request:
Code: 204
Req: {<0.25761.1>,<<"/api/stanzas">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"d9673f086643efc4">>}],
<<"{\"stanza\":\"the bodyinside the sibling\"}">>}
Result: {{<<"204">>,<<"No Content">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Wed, 02 Feb 2022 15:14:56 GMT">>},
{<<"content-type">>,<<"application/json">>}],
<<>>,112,7312}
Params: #{body =>
<<"{\"stanza\":\"the bodyinside the sibling\"}">>,
method => <<"POST">>,path => <<"/api/stanzas">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-02-02 15:14:56.978 ***
bOb_stanzas_are_sent_and_received_1603@domain.example.com/res1 in
<message from='alicE_stanzas_are_sent_and_received_1603@domain.example.com/res1' to='bOb_stanzas_are_sent_and_received_1603@domain.example.com/res1' extra='attribute'>
<body>the body</body>
<sibling>inside the sibling</sibling>
<stanza-id by='bOb_stanzas_are_sent_and_received_1603@domain.example.com' id='BLOAFC1BC5G1' xmlns='urn:xmpp:sid:0'/>
</message>
*** User 2022-02-02 15:14:56.978 ***
M: {xmlel,<<"message">>,
[{<<"from">>,
<<"alicE_stanzas_are_sent_and_received_1603@domain.example.com/res1">>},
{<<"extra">>,<<"attribute">>}],
[{xmlel,<<"body">>,[],[{xmlcdata,<<"the body">>}]},
{xmlel,<<"sibling">>,[],[{xmlcdata,<<"inside the sibling">>}]}]}
*** User 2022-02-02 15:14:56.980 ***
REST request fails:
Code: 400
Req: {<0.25792.1>,<<"/api/stanzas">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"76d593d8bd183f1e">>}],
<<"{\"stanza\":\"the bodyinside the sibling\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Wed, 02 Feb 2022 15:14:56 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"29">>}],
<<"both from and to are required">>,162,848}
Params: #{body =>
<<"{\"stanza\":\"the bodyinside the sibling\"}">>,
method => <<"POST">>,path => <<"/api/stanzas">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-02-02 15:14:56.982 ***
REST request fails:
Code: 400
Req: {<0.25796.1>,<<"/api/stanzas">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"4e71e300e6006ec0">>}],
<<"{\"stanza\":\"the body>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Wed, 02 Feb 2022 15:14:56 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"30">>}],
<<"Malformed stanza: \"expected >\"">>,163,950}
Params: #{body =>
<<"{\"stanza\":\"the body>,
method => <<"POST">>,path => <<"/api/stanzas">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-02-02 15:14:56.983 ***
bOb_stanzas_are_sent_and_received_1603@domain.example.com/res1 out
</stream:stream>
*** User 2022-02-02 15:14:56.983 ***
bOb_stanzas_are_sent_and_received_1603@domain.example.com/res1 in
</stream:stream>
*** User 2022-02-02 15:14:56.983 ***
alicE_stanzas_are_sent_and_received_1603@domain.example.com/res1 out
</stream:stream>
*** User 2022-02-02 15:14:56.983 ***
alicE_stanzas_are_sent_and_received_1603@domain.example.com/res1 in
</stream:stream>
=== Ended at 2022-02-02 15:14:57
=== successfully completed test case
=== === Returned value: ok