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


*** CT 2022-02-02 15:14:56.931 *** View log from node mongooseim@localhost when started mongooseim@localhost_2326.html
*** CT 2022-02-02 15:14:56.932 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_628.html

*** User 2022-02-02 15:14:56.956 ***
alicE_messages_are_sent_and_received_1602@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_messages_are_sent_and_received_1602@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='556b8fbc8c9ef9e1' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-02-02 15:14:56.957 ***
alicE_messages_are_sent_and_received_1602@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_messages_are_sent_and_received_1602@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX21lc3NhZ2VzX2FyZV9zZW50X2FuZF9yZWNlaXZlZF8xNjAyAG1hdHlncnlzYQ==</auth>



*** User 2022-02-02 15:14:56.958 ***
alicE_messages_are_sent_and_received_1602@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-02-02 15:14:56.959 ***
alicE_messages_are_sent_and_received_1602@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_messages_are_sent_and_received_1602@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='860c05a5d02122ca' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-02-02 15:14:56.959 ***
alicE_messages_are_sent_and_received_1602@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_messages_are_sent_and_received_1602@domain.example.com/res1 out
<iq type='set' id='e7de27f4167f0e3c2a6c40315dcaca1a'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-02-02 15:14:56.960 ***
alicE_messages_are_sent_and_received_1602@domain.example.com/res1 in
<iq id='e7de27f4167f0e3c2a6c40315dcaca1a' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alicE_messages_are_sent_and_received_1602@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2022-02-02 15:14:56.960 ***
alicE_messages_are_sent_and_received_1602@domain.example.com/res1 out
<iq type='set' id='f1565764a4b53f64ef900c123ceb9efd'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-02-02 15:14:56.960 ***
alicE_messages_are_sent_and_received_1602@domain.example.com/res1 in
<iq type='result' id='f1565764a4b53f64ef900c123ceb9efd'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-02-02 15:14:56.960 ***
alicE_messages_are_sent_and_received_1602@domain.example.com/res1 out
<presence/>



*** User 2022-02-02 15:14:56.962 ***
alicE_messages_are_sent_and_received_1602@domain.example.com/res1 in
<presence from='alicE_messages_are_sent_and_received_1602@domain.example.com/res1' to='alice_messages_are_sent_and_received_1602@domain.example.com/res1' xml:lang='en'/>



*** User 2022-02-02 15:14:56.963 ***
bOb_messages_are_sent_and_received_1602@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_messages_are_sent_and_received_1602@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='5b4a84a3e9f6d085' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-02-02 15:14:56.963 ***
bOb_messages_are_sent_and_received_1602@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_messages_are_sent_and_received_1602@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9tZXNzYWdlc19hcmVfc2VudF9hbmRfcmVjZWl2ZWRfMTYwMgBtYWtyb2xpa2E=</auth>



*** User 2022-02-02 15:14:56.964 ***
bOb_messages_are_sent_and_received_1602@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-02-02 15:14:56.964 ***
bOb_messages_are_sent_and_received_1602@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_messages_are_sent_and_received_1602@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='ae8a49567be6b22d' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-02-02 15:14:56.965 ***
bOb_messages_are_sent_and_received_1602@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.965 ***
bOb_messages_are_sent_and_received_1602@domain.example.com/res1 out
<iq type='set' id='b54150281c321e1499d0091bd9b43c01'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-02-02 15:14:56.966 ***
bOb_messages_are_sent_and_received_1602@domain.example.com/res1 in
<iq id='b54150281c321e1499d0091bd9b43c01' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bOb_messages_are_sent_and_received_1602@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2022-02-02 15:14:56.966 ***
bOb_messages_are_sent_and_received_1602@domain.example.com/res1 out
<iq type='set' id='b1983c3e57cf43f05376da7f95c7e72b'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-02-02 15:14:56.966 ***
bOb_messages_are_sent_and_received_1602@domain.example.com/res1 in
<iq type='result' id='b1983c3e57cf43f05376da7f95c7e72b'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-02-02 15:14:56.966 ***
bOb_messages_are_sent_and_received_1602@domain.example.com/res1 out
<presence/>



*** User 2022-02-02 15:14:56.969 ***
bOb_messages_are_sent_and_received_1602@domain.example.com/res1 in
<presence from='bOb_messages_are_sent_and_received_1602@domain.example.com/res1' to='bob_messages_are_sent_and_received_1602@domain.example.com/res1' xml:lang='en'/>



*** User 2022-02-02 15:14:56.978 ***
REST request:
Code: 204
Req: {<0.25763.1>,<<"/api/messages">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"f998393a857272b4">>}],
      <<"{\"to\":\"alice_messages_are_sent_and_received_1602@domain.example.com\",\"caller\":\"bob_messages_are_sent_and_received_1602@domain.example.com\",\"body\":\"hello from Bob\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Wed, 02 Feb 2022 15:14:56 GMT">>},
          {<<"content-type">>,<<"application/json">>}],
         <<>>,112,7317}
Params: #{body =>
              <<"{\"to\":\"alice_messages_are_sent_and_received_1602@domain.example.com\",\"caller\":\"bob_messages_are_sent_and_received_1602@domain.example.com\",\"body\":\"hello from Bob\"}">>,
          method => <<"POST">>,path => <<"/api/messages">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-02-02 15:14:56.983 ***
REST request:
Code: 204
Req: {<0.25790.1>,<<"/api/messages">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"ae864ba6f7f8fc30">>}],
      <<"{\"to\":\"bob_messages_are_sent_and_received_1602@domain.example.com\",\"caller\":\"alice_messages_are_sent_and_received_1602@domain.example.com\",\"body\":\"hello from Alice\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Wed, 02 Feb 2022 15:14:56 GMT">>},
          {<<"content-type">>,<<"application/json">>}],
         <<>>,112,3649}
Params: #{body =>
              <<"{\"to\":\"bob_messages_are_sent_and_received_1602@domain.example.com\",\"caller\":\"alice_messages_are_sent_and_received_1602@domain.example.com\",\"body\":\"hello from Alice\"}">>,
          method => <<"POST">>,path => <<"/api/messages">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-02-02 15:14:56.983 ***
alicE_messages_are_sent_and_received_1602@domain.example.com/res1 in
<message from='bob_messages_are_sent_and_received_1602@domain.example.com' to='alice_messages_are_sent_and_received_1602@domain.example.com' type='chat' id='715139bf30398e3b'>
	<body>hello from Bob</body>
	<stanza-id by='alice_messages_are_sent_and_received_1602@domain.example.com' id='BLOAFC1BC5O1' xmlns='urn:xmpp:sid:0'/>
</message>



*** User 2022-02-02 15:14:56.983 ***
bOb_messages_are_sent_and_received_1602@domain.example.com/res1 in
<message from='alice_messages_are_sent_and_received_1602@domain.example.com' to='bob_messages_are_sent_and_received_1602@domain.example.com' type='chat' id='eb77ef996299ad57'>
	<body>hello from Alice</body>
	<stanza-id by='bob_messages_are_sent_and_received_1602@domain.example.com' id='BLOAFC1D4UG1' xmlns='urn:xmpp:sid:0'/>
</message>



*** User 2022-02-02 15:14:56.984 ***
bOb_messages_are_sent_and_received_1602@domain.example.com/res1 out
</stream:stream>

*** User 2022-02-02 15:14:56.984 ***
bOb_messages_are_sent_and_received_1602@domain.example.com/res1 in
</stream:stream>

*** User 2022-02-02 15:14:56.984 ***
alicE_messages_are_sent_and_received_1602@domain.example.com/res1 out
</stream:stream>

*** User 2022-02-02 15:14:56.985 ***
alicE_messages_are_sent_and_received_1602@domain.example.com/res1 in
</stream:stream>
*** CT 2022-02-02 15:14:56.991 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_628.html
*** CT 2022-02-02 15:14:56.992 *** View log from node mongooseim@localhost when finished mongooseim@localhost_2327.html



=== Ended at 2022-02-02 15:14:57
=== successfully completed test case
=== === Returned value: ok