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

=== Config value:

    [{watchdog,<0.13681.1>},
     {{ejabberd_cwd,mongooseim@localhost},
      "/home/circleci/project/_build/mim1/rel/mongooseim"},
     {mam_backend,disabled},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/rest_SUITE_data"},
     {preset,"internal_mnesia"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@34a9b6d2516c.2022-01-27_15.25.07/big_tests.tests.rest_SUITE.logs/run.2022-01-27_15.35.34/rest_suite.messages_are_sent_and_received.50435.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@34a9b6d2516c.2022-01-27_15.25.07/big_tests.tests.rest_SUITE.logs/run.2022-01-27_15.35.34/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@34a9b6d2516c.2022-01-27_15.25.07"

=== Started at 2022-01-27 15:35:34


*** CT 2022-01-27 15:35:34.895 *** View log from node mongooseim@localhost when started mongooseim@localhost_5143.html
*** CT 2022-01-27 15:35:34.896 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_2357.html

*** User 2022-01-27 15:35:34.908 ***
alicE_messages_are_sent_and_received_1340@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:35:34.910 ***
alicE_messages_are_sent_and_received_1340@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='77c90bb77e8257ea' from='localhost' version='1.0' xml:lang='en'>

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



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



*** User 2022-01-27 15:35:34.912 ***
alicE_messages_are_sent_and_received_1340@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:35:34.913 ***
alicE_messages_are_sent_and_received_1340@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='e859cb8dd02c6951' from='localhost' version='1.0' xml:lang='en'>

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



*** User 2022-01-27 15:35:34.913 ***
alicE_messages_are_sent_and_received_1340@localhost/res1 in
<iq id='d27150f913942da4535a248111ed4913' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alicE_messages_are_sent_and_received_1340@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-01-27 15:35:34.913 ***
alicE_messages_are_sent_and_received_1340@localhost/res1 out
<iq type='set' id='0a78929a85f4af34c5e52eb77144329a'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:35:34.914 ***
alicE_messages_are_sent_and_received_1340@localhost/res1 in
<iq type='result' id='0a78929a85f4af34c5e52eb77144329a'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:35:34.914 ***
alicE_messages_are_sent_and_received_1340@localhost/res1 out
<presence/>



*** User 2022-01-27 15:35:34.915 ***
alicE_messages_are_sent_and_received_1340@localhost/res1 in
<presence from='alicE_messages_are_sent_and_received_1340@localhost/res1' to='alice_messages_are_sent_and_received_1340@localhost/res1' xml:lang='en'/>



*** User 2022-01-27 15:35:34.915 ***
bOb_messages_are_sent_and_received_1340@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:35:34.916 ***
bOb_messages_are_sent_and_received_1340@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='ba3cfd607aca9cda' from='localhost' version='1.0' xml:lang='en'>

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



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



*** User 2022-01-27 15:35:34.916 ***
bOb_messages_are_sent_and_received_1340@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:35:34.917 ***
bOb_messages_are_sent_and_received_1340@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='d6771f5f509a5409' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-27 15:35:34.917 ***
bOb_messages_are_sent_and_received_1340@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:35:34.917 ***
bOb_messages_are_sent_and_received_1340@localhost/res1 out
<iq type='set' id='79aeb13422a06ed60d2f41ce7da2c4b0'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-01-27 15:35:34.917 ***
bOb_messages_are_sent_and_received_1340@localhost/res1 in
<iq id='79aeb13422a06ed60d2f41ce7da2c4b0' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bOb_messages_are_sent_and_received_1340@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-01-27 15:35:34.917 ***
bOb_messages_are_sent_and_received_1340@localhost/res1 out
<iq type='set' id='87c313571815a5e10765eb861fdfc1b7'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:35:34.917 ***
bOb_messages_are_sent_and_received_1340@localhost/res1 in
<iq type='result' id='87c313571815a5e10765eb861fdfc1b7'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:35:34.917 ***
bOb_messages_are_sent_and_received_1340@localhost/res1 out
<presence/>



*** User 2022-01-27 15:35:34.918 ***
bOb_messages_are_sent_and_received_1340@localhost/res1 in
<presence from='bOb_messages_are_sent_and_received_1340@localhost/res1' to='bob_messages_are_sent_and_received_1340@localhost/res1' xml:lang='en'/>



*** User 2022-01-27 15:35:34.920 ***
REST request:
Code: 204
Req: {<0.13892.1>,<<"/api/messages">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"3a147c4a5fcc29d8">>}],
      <<"{\"to\":\"alice_messages_are_sent_and_received_1340@localhost\",\"caller\":\"bob_messages_are_sent_and_received_1340@localhost\",\"body\":\"hello from Bob\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 15:35:34 GMT">>},
          {<<"content-type">>,<<"application/json">>}],
         <<>>,112,670}
Params: #{body =>
              <<"{\"to\":\"alice_messages_are_sent_and_received_1340@localhost\",\"caller\":\"bob_messages_are_sent_and_received_1340@localhost\",\"body\":\"hello from Bob\"}">>,
          method => <<"POST">>,path => <<"/api/messages">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 15:35:34.922 ***
REST request:
Code: 204
Req: {<0.13903.1>,<<"/api/messages">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"5538add328ca3827">>}],
      <<"{\"to\":\"bob_messages_are_sent_and_received_1340@localhost\",\"caller\":\"alice_messages_are_sent_and_received_1340@localhost\",\"body\":\"hello from Alice\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 15:35:34 GMT">>},
          {<<"content-type">>,<<"application/json">>}],
         <<>>,112,645}
Params: #{body =>
              <<"{\"to\":\"bob_messages_are_sent_and_received_1340@localhost\",\"caller\":\"alice_messages_are_sent_and_received_1340@localhost\",\"body\":\"hello from Alice\"}">>,
          method => <<"POST">>,path => <<"/api/messages">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 15:35:34.922 ***
alicE_messages_are_sent_and_received_1340@localhost/res1 in
<message from='bob_messages_are_sent_and_received_1340@localhost' to='alice_messages_are_sent_and_received_1340@localhost' type='chat' id='233a04acafd14068'>
	<body>hello from Bob</body>
</message>



*** User 2022-01-27 15:35:34.922 ***
bOb_messages_are_sent_and_received_1340@localhost/res1 in
<message from='alice_messages_are_sent_and_received_1340@localhost' to='bob_messages_are_sent_and_received_1340@localhost' type='chat' id='badf0c8c1bcdf144'>
	<body>hello from Alice</body>
</message>



*** User 2022-01-27 15:35:34.922 ***
bOb_messages_are_sent_and_received_1340@localhost/res1 out
</stream:stream>

*** User 2022-01-27 15:35:34.922 ***
bOb_messages_are_sent_and_received_1340@localhost/res1 in
</stream:stream>

*** User 2022-01-27 15:35:34.922 ***
alicE_messages_are_sent_and_received_1340@localhost/res1 out
</stream:stream>

*** User 2022-01-27 15:35:34.923 ***
alicE_messages_are_sent_and_received_1340@localhost/res1 in
</stream:stream>
*** CT 2022-01-27 15:35:34.929 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_2357.html
*** CT 2022-01-27 15:35:34.929 *** View log from node mongooseim@localhost when finished mongooseim@localhost_5143.html



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