=== Test case: rest_SUITE:messages_are_sent_and_received/1 (click for source code)

=== Config value:

    [{watchdog,<0.8353.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@43a5deef6262.2022-01-27_15.25.11/big_tests.tests.rest_SUITE.logs/run.2022-01-27_15.36.47/rest_suite.messages_are_sent_and_received.120067.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@43a5deef6262.2022-01-27_15.25.11/big_tests.tests.rest_SUITE.logs/run.2022-01-27_15.36.47/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@43a5deef6262.2022-01-27_15.25.11"

=== Started at 2022-01-27 15:36:47


*** CT 2022-01-27 15:36:47.944 *** View log from node mongooseim@localhost when started mongooseim@localhost_5698.html
*** CT 2022-01-27 15:36:47.944 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_2385.html

*** User 2022-01-27 15:36:47.973 ***
alicE_messages_are_sent_and_received_2142@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-27 15:36:47.973 ***
alicE_messages_are_sent_and_received_2142@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='56b83789c9b5d08f' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-27 15:36:47.974 ***
alicE_messages_are_sent_and_received_2142@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-27 15:36:47.974 ***
alicE_messages_are_sent_and_received_2142@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX21lc3NhZ2VzX2FyZV9zZW50X2FuZF9yZWNlaXZlZF8yMTQyAG1hdHlncnlzYQ==</auth>



*** User 2022-01-27 15:36:47.975 ***
alicE_messages_are_sent_and_received_2142@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-01-27 15:36:47.975 ***
alicE_messages_are_sent_and_received_2142@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-27 15:36:47.976 ***
alicE_messages_are_sent_and_received_2142@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='d176023828583846' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-27 15:36:47.976 ***
alicE_messages_are_sent_and_received_2142@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-27 15:36:47.976 ***
alicE_messages_are_sent_and_received_2142@localhost/res1 out
<iq type='set' id='50444031132f61ee487957bdfa4560b1'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-01-27 15:36:47.977 ***
alicE_messages_are_sent_and_received_2142@localhost/res1 in
<iq id='50444031132f61ee487957bdfa4560b1' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alicE_messages_are_sent_and_received_2142@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-01-27 15:36:47.977 ***
alicE_messages_are_sent_and_received_2142@localhost/res1 out
<iq type='set' id='c9b545174e706c59b72fb7ad9624effd'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:36:47.977 ***
alicE_messages_are_sent_and_received_2142@localhost/res1 in
<iq type='result' id='c9b545174e706c59b72fb7ad9624effd'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:36:47.978 ***
alicE_messages_are_sent_and_received_2142@localhost/res1 out
<presence/>



*** User 2022-01-27 15:36:47.988 ***
alicE_messages_are_sent_and_received_2142@localhost/res1 in
<presence from='alicE_messages_are_sent_and_received_2142@localhost/res1' to='alice_messages_are_sent_and_received_2142@localhost/res1' xml:lang='en'/>



*** User 2022-01-27 15:36:47.989 ***
bOb_messages_are_sent_and_received_2142@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-27 15:36:47.990 ***
bOb_messages_are_sent_and_received_2142@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='bbce9dea6a58beb8' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-27 15:36:47.990 ***
bOb_messages_are_sent_and_received_2142@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-27 15:36:47.990 ***
bOb_messages_are_sent_and_received_2142@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9tZXNzYWdlc19hcmVfc2VudF9hbmRfcmVjZWl2ZWRfMjE0MgBtYWtyb2xpa2E=</auth>



*** User 2022-01-27 15:36:47.991 ***
bOb_messages_are_sent_and_received_2142@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-01-27 15:36:47.991 ***
bOb_messages_are_sent_and_received_2142@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-27 15:36:47.992 ***
bOb_messages_are_sent_and_received_2142@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='692b5c954719e227' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-27 15:36:47.992 ***
bOb_messages_are_sent_and_received_2142@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-27 15:36:47.992 ***
bOb_messages_are_sent_and_received_2142@localhost/res1 out
<iq type='set' id='c8ba468e15f453d0394a162e5e9317e4'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-01-27 15:36:47.992 ***
bOb_messages_are_sent_and_received_2142@localhost/res1 in
<iq id='c8ba468e15f453d0394a162e5e9317e4' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bOb_messages_are_sent_and_received_2142@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-01-27 15:36:47.992 ***
bOb_messages_are_sent_and_received_2142@localhost/res1 out
<iq type='set' id='3ab68a25637bda95cbbd8aaac25e4e12'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:36:47.993 ***
bOb_messages_are_sent_and_received_2142@localhost/res1 in
<iq type='result' id='3ab68a25637bda95cbbd8aaac25e4e12'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:36:47.993 ***
bOb_messages_are_sent_and_received_2142@localhost/res1 out
<presence/>



*** User 2022-01-27 15:36:48.042 ***
bOb_messages_are_sent_and_received_2142@localhost/res1 in
<presence from='bOb_messages_are_sent_and_received_2142@localhost/res1' to='bob_messages_are_sent_and_received_2142@localhost/res1' xml:lang='en'/>



*** User 2022-01-27 15:36:48.073 ***
REST request:
Code: 204
Req: {<0.8575.2>,<<"/api/messages">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"12ab37676298e25d">>}],
      <<"{\"to\":\"alice_messages_are_sent_and_received_2142@localhost\",\"caller\":\"bob_messages_are_sent_and_received_2142@localhost\",\"body\":\"hello from Bob\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 15:36:48 GMT">>},
          {<<"content-type">>,<<"application/json">>}],
         <<>>,112,29522}
Params: #{body =>
              <<"{\"to\":\"alice_messages_are_sent_and_received_2142@localhost\",\"caller\":\"bob_messages_are_sent_and_received_2142@localhost\",\"body\":\"hello from Bob\"}">>,
          method => <<"POST">>,path => <<"/api/messages">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 15:36:48.143 ***
REST request:
Code: 204
Req: {<0.8624.2>,<<"/api/messages">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"b994a659d900b475">>}],
      <<"{\"to\":\"bob_messages_are_sent_and_received_2142@localhost\",\"caller\":\"alice_messages_are_sent_and_received_2142@localhost\",\"body\":\"hello from Alice\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 15:36:48 GMT">>},
          {<<"content-type">>,<<"application/json">>}],
         <<>>,112,69225}
Params: #{body =>
              <<"{\"to\":\"bob_messages_are_sent_and_received_2142@localhost\",\"caller\":\"alice_messages_are_sent_and_received_2142@localhost\",\"body\":\"hello from Alice\"}">>,
          method => <<"POST">>,path => <<"/api/messages">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 15:36:48.143 ***
alicE_messages_are_sent_and_received_2142@localhost/res1 in
<message from='bob_messages_are_sent_and_received_2142@localhost' to='alice_messages_are_sent_and_received_2142@localhost' type='chat' id='cfd9ea3e07c5b60b'>
	<body>hello from Bob</body>
	<stanza-id by='alice_messages_are_sent_and_received_2142@localhost' id='BLKI2ODUPH01' xmlns='urn:xmpp:sid:0'/>
</message>



*** User 2022-01-27 15:36:48.143 ***
bOb_messages_are_sent_and_received_2142@localhost/res1 in
<message from='alice_messages_are_sent_and_received_2142@localhost' to='bob_messages_are_sent_and_received_2142@localhost' type='chat' id='0d4392bcac073026'>
	<body>hello from Alice</body>
	<stanza-id by='bob_messages_are_sent_and_received_2142@localhost' id='BLKI2OE660O1' xmlns='urn:xmpp:sid:0'/>
</message>



*** User 2022-01-27 15:36:48.143 ***
bOb_messages_are_sent_and_received_2142@localhost/res1 out
</stream:stream>

*** User 2022-01-27 15:36:48.144 ***
bOb_messages_are_sent_and_received_2142@localhost/res1 in
</stream:stream>

*** User 2022-01-27 15:36:48.144 ***
alicE_messages_are_sent_and_received_2142@localhost/res1 out
</stream:stream>

*** User 2022-01-27 15:36:48.144 ***
alicE_messages_are_sent_and_received_2142@localhost/res1 in
</stream:stream>
*** CT 2022-01-27 15:36:48.146 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_2385.html
*** CT 2022-01-27 15:36:48.147 *** View log from node mongooseim@localhost when finished mongooseim@localhost_5699.html



=== Ended at 2022-01-27 15:36:48
=== successfully completed test case
=== === Returned value: ok