=== Test case: rest_SUITE:messages_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.messages_are_sent_and_received.160642.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


*** CT 2022-03-04 11:27:36.998 *** View log from node mongooseim@localhost when started mongooseim@localhost_5789.html
*** CT 2022-03-04 11:27:36.999 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_2335.html

*** User 2022-03-04 11:27:37.020 ***
alicE_messages_are_sent_and_received_1994@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.023 ***
alicE_messages_are_sent_and_received_1994@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='d8800e21a418ede4' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-04 11:27:37.023 ***
alicE_messages_are_sent_and_received_1994@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.023 ***
alicE_messages_are_sent_and_received_1994@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX21lc3NhZ2VzX2FyZV9zZW50X2FuZF9yZWNlaXZlZF8xOTk0AG1hdHlncnlzYQ==</auth>



*** User 2022-03-04 11:27:37.027 ***
alicE_messages_are_sent_and_received_1994@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-03-04 11:27:37.027 ***
alicE_messages_are_sent_and_received_1994@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.027 ***
alicE_messages_are_sent_and_received_1994@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='040a8e8e1e9709e0' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-04 11:27:37.028 ***
alicE_messages_are_sent_and_received_1994@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.028 ***
alicE_messages_are_sent_and_received_1994@localhost/res1 out
<iq type='set' id='1df693296880e0142591dc281f8c2896'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-03-04 11:27:37.028 ***
alicE_messages_are_sent_and_received_1994@localhost/res1 in
<iq id='1df693296880e0142591dc281f8c2896' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alicE_messages_are_sent_and_received_1994@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-03-04 11:27:37.028 ***
alicE_messages_are_sent_and_received_1994@localhost/res1 out
<iq type='set' id='984d978ec15e35a96a4da2bebcf65df9'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-04 11:27:37.029 ***
alicE_messages_are_sent_and_received_1994@localhost/res1 in
<iq type='result' id='984d978ec15e35a96a4da2bebcf65df9'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-04 11:27:37.029 ***
alicE_messages_are_sent_and_received_1994@localhost/res1 out
<presence/>



*** User 2022-03-04 11:27:37.031 ***
alicE_messages_are_sent_and_received_1994@localhost/res1 in
<presence from='alicE_messages_are_sent_and_received_1994@localhost/res1' to='alice_messages_are_sent_and_received_1994@localhost/res1' xml:lang='en'/>



*** User 2022-03-04 11:27:37.032 ***
bOb_messages_are_sent_and_received_1994@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.033 ***
bOb_messages_are_sent_and_received_1994@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='7afe6281845296b2' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-04 11:27:37.033 ***
bOb_messages_are_sent_and_received_1994@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.033 ***
bOb_messages_are_sent_and_received_1994@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9tZXNzYWdlc19hcmVfc2VudF9hbmRfcmVjZWl2ZWRfMTk5NABtYWtyb2xpa2E=</auth>



*** User 2022-03-04 11:27:37.034 ***
bOb_messages_are_sent_and_received_1994@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-03-04 11:27:37.034 ***
bOb_messages_are_sent_and_received_1994@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.035 ***
bOb_messages_are_sent_and_received_1994@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='a91cc43922a63a90' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-04 11:27:37.035 ***
bOb_messages_are_sent_and_received_1994@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.035 ***
bOb_messages_are_sent_and_received_1994@localhost/res1 out
<iq type='set' id='0e17b95aa752be37c5aa114ef6fa3c20'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-03-04 11:27:37.036 ***
bOb_messages_are_sent_and_received_1994@localhost/res1 in
<iq id='0e17b95aa752be37c5aa114ef6fa3c20' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bOb_messages_are_sent_and_received_1994@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-03-04 11:27:37.036 ***
bOb_messages_are_sent_and_received_1994@localhost/res1 out
<iq type='set' id='0fd04cd08603090ec3e91e51d01abfb4'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-04 11:27:37.036 ***
bOb_messages_are_sent_and_received_1994@localhost/res1 in
<iq type='result' id='0fd04cd08603090ec3e91e51d01abfb4'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-04 11:27:37.036 ***
bOb_messages_are_sent_and_received_1994@localhost/res1 out
<presence/>



*** User 2022-03-04 11:27:37.047 ***
bOb_messages_are_sent_and_received_1994@localhost/res1 in
<presence from='bOb_messages_are_sent_and_received_1994@localhost/res1' to='bob_messages_are_sent_and_received_1994@localhost/res1' xml:lang='en'/>



*** User 2022-03-04 11:27:37.059 ***
REST request:
Code: 204
Req: {<0.10658.2>,<<"/api/messages">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"602a654f7f66a45e">>}],
      <<"{\"to\":\"alice_messages_are_sent_and_received_1994@localhost\",\"caller\":\"bob_messages_are_sent_and_received_1994@localhost\",\"body\":\"hello from Bob\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Fri, 04 Mar 2022 11:27:36 GMT">>},
          {<<"content-type">>,<<"application/json">>}],
         <<>>,112,10546}
Params: #{body =>
              <<"{\"to\":\"alice_messages_are_sent_and_received_1994@localhost\",\"caller\":\"bob_messages_are_sent_and_received_1994@localhost\",\"body\":\"hello from Bob\"}">>,
          method => <<"POST">>,path => <<"/api/messages">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-04 11:27:37.065 ***
REST request:
Code: 204
Req: {<0.10694.2>,<<"/api/messages">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"77ff122cb7f25686">>}],
      <<"{\"to\":\"bob_messages_are_sent_and_received_1994@localhost\",\"caller\":\"alice_messages_are_sent_and_received_1994@localhost\",\"body\":\"hello from Alice\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Fri, 04 Mar 2022 11:27:36 GMT">>},
          {<<"content-type">>,<<"application/json">>}],
         <<>>,112,5224}
Params: #{body =>
              <<"{\"to\":\"bob_messages_are_sent_and_received_1994@localhost\",\"caller\":\"alice_messages_are_sent_and_received_1994@localhost\",\"body\":\"hello from Alice\"}">>,
          method => <<"POST">>,path => <<"/api/messages">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-04 11:27:37.065 ***
alicE_messages_are_sent_and_received_1994@localhost/res1 in
<message from='bob_messages_are_sent_and_received_1994@localhost' to='alice_messages_are_sent_and_received_1994@localhost' type='chat' id='e349e26dde023f74'>
	<body>hello from Bob</body>
	<stanza-id by='alice_messages_are_sent_and_received_1994@localhost' id='BMB2PKVL4BO1' xmlns='urn:xmpp:sid:0'/>
</message>



*** User 2022-03-04 11:27:37.067 ***
bOb_messages_are_sent_and_received_1994@localhost/res1 in
<message from='alice_messages_are_sent_and_received_1994@localhost' to='bob_messages_are_sent_and_received_1994@localhost' type='chat' id='fb4c8c38d2fcf3f6'>
	<body>hello from Alice</body>
	<stanza-id by='bob_messages_are_sent_and_received_1994@localhost' id='BMB2PKVMMP81' xmlns='urn:xmpp:sid:0'/>
</message>



*** User 2022-03-04 11:27:37.067 ***
bOb_messages_are_sent_and_received_1994@localhost/res1 out
</stream:stream>

*** User 2022-03-04 11:27:37.067 ***
bOb_messages_are_sent_and_received_1994@localhost/res1 in
</stream:stream>

*** User 2022-03-04 11:27:37.067 ***
alicE_messages_are_sent_and_received_1994@localhost/res1 out
</stream:stream>

*** User 2022-03-04 11:27:37.069 ***
alicE_messages_are_sent_and_received_1994@localhost/res1 in
</stream:stream>
*** CT 2022-03-04 11:27:37.074 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_2335.html
*** CT 2022-03-04 11:27:37.075 *** View log from node mongooseim@localhost when finished mongooseim@localhost_5790.html



=== Ended at 2022-03-04 11:27:37
=== successfully completed test case
=== === Returned value: ok