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

=== Config value:

    [{watchdog,<0.24874.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,"odbc_mssql_mnesia"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@998557c7e1d1.2022-01-27_12.27.57/big_tests.tests.rest_SUITE.logs/run.2022-01-27_12.36.31/rest_suite.messages_are_archived.61444.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@998557c7e1d1.2022-01-27_12.27.57/big_tests.tests.rest_SUITE.logs/run.2022-01-27_12.36.31/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@998557c7e1d1.2022-01-27_12.27.57"

=== Started at 2022-01-27 12:36:31


*** CT 2022-01-27 12:36:31.272 *** View log from node mongooseim@localhost when started mongooseim@localhost_2363.html
*** CT 2022-01-27 12:36:31.273 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_655.html

*** User 2022-01-27 12:36:31.334 ***
alicE_messages_are_archived_1731@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-01-27 12:36:31.334 ***
alicE_messages_are_archived_1731@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='7c626abdb0ea064c' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-01-27 12:36:31.335 ***
alicE_messages_are_archived_1731@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-01-27 12:36:31.335 ***
alicE_messages_are_archived_1731@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX21lc3NhZ2VzX2FyZV9hcmNoaXZlZF8xNzMxAG1hdHlncnlzYQ==</auth>



*** User 2022-01-27 12:36:31.337 ***
alicE_messages_are_archived_1731@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-01-27 12:36:31.338 ***
alicE_messages_are_archived_1731@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-01-27 12:36:31.338 ***
alicE_messages_are_archived_1731@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='088c5379a1c055a0' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-01-27 12:36:31.338 ***
alicE_messages_are_archived_1731@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-01-27 12:36:31.339 ***
alicE_messages_are_archived_1731@domain.example.com/res1 out
<iq type='set' id='6d18886a48c65b2ed63e60199a2527ff'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-01-27 12:36:31.339 ***
alicE_messages_are_archived_1731@domain.example.com/res1 in
<iq id='6d18886a48c65b2ed63e60199a2527ff' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alicE_messages_are_archived_1731@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2022-01-27 12:36:31.339 ***
alicE_messages_are_archived_1731@domain.example.com/res1 out
<iq type='set' id='5939f49a807a533d701c9550b99690db'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 12:36:31.339 ***
alicE_messages_are_archived_1731@domain.example.com/res1 in
<iq type='result' id='5939f49a807a533d701c9550b99690db'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 12:36:31.340 ***
alicE_messages_are_archived_1731@domain.example.com/res1 out
<presence/>



*** User 2022-01-27 12:36:31.344 ***
alicE_messages_are_archived_1731@domain.example.com/res1 in
<presence from='alicE_messages_are_archived_1731@domain.example.com/res1' to='alice_messages_are_archived_1731@domain.example.com/res1' xml:lang='en'/>



*** User 2022-01-27 12:36:31.346 ***
bOb_messages_are_archived_1731@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-01-27 12:36:31.349 ***
bOb_messages_are_archived_1731@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='98e27a3378ef3bf2' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-01-27 12:36:31.350 ***
bOb_messages_are_archived_1731@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-01-27 12:36:31.350 ***
bOb_messages_are_archived_1731@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9tZXNzYWdlc19hcmVfYXJjaGl2ZWRfMTczMQBtYWtyb2xpa2E=</auth>



*** User 2022-01-27 12:36:31.353 ***
bOb_messages_are_archived_1731@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-01-27 12:36:31.353 ***
bOb_messages_are_archived_1731@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-01-27 12:36:31.354 ***
bOb_messages_are_archived_1731@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='905b562ef92ab55b' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-01-27 12:36:31.354 ***
bOb_messages_are_archived_1731@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-01-27 12:36:31.354 ***
bOb_messages_are_archived_1731@domain.example.com/res1 out
<iq type='set' id='f68e2cec9c9dd60ebc263309f8293259'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-01-27 12:36:31.355 ***
bOb_messages_are_archived_1731@domain.example.com/res1 in
<iq id='f68e2cec9c9dd60ebc263309f8293259' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bOb_messages_are_archived_1731@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2022-01-27 12:36:31.355 ***
bOb_messages_are_archived_1731@domain.example.com/res1 out
<iq type='set' id='2c40b5bdaa268a433113e5fa35f44c57'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 12:36:31.356 ***
bOb_messages_are_archived_1731@domain.example.com/res1 in
<iq type='result' id='2c40b5bdaa268a433113e5fa35f44c57'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 12:36:31.356 ***
bOb_messages_are_archived_1731@domain.example.com/res1 out
<presence/>



*** User 2022-01-27 12:36:31.365 ***
bOb_messages_are_archived_1731@domain.example.com/res1 in
<presence from='bOb_messages_are_archived_1731@domain.example.com/res1' to='bob_messages_are_archived_1731@domain.example.com/res1' xml:lang='en'/>



*** User 2022-01-27 12:36:31.474 ***
REST request:
Code: 204
Req: {<0.25110.1>,<<"/api/messages">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"02f468de55c65b83">>}],
      <<"{\"to\":\"alice_messages_are_archived_1731@domain.example.com\",\"caller\":\"bob_messages_are_archived_1731@domain.example.com\",\"body\":\"hello from Bob\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 12:36:31 GMT">>},
          {<<"content-type">>,<<"application/json">>}],
         <<>>,112,105791}
Params: #{body =>
              <<"{\"to\":\"alice_messages_are_archived_1731@domain.example.com\",\"caller\":\"bob_messages_are_archived_1731@domain.example.com\",\"body\":\"hello from Bob\"}">>,
          method => <<"POST">>,path => <<"/api/messages">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}

Could not find element wait_for_parallel_writer in Config.

Could not find element archive_wait in Config.


*** User 2022-01-27 12:36:31.509 ***
REST request:
Code: 204
Req: {<0.25151.1>,<<"/api/messages">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"385e40c25b07f069">>}],
      <<"{\"to\":\"bob_messages_are_archived_1731@domain.example.com\",\"caller\":\"alice_messages_are_archived_1731@domain.example.com\",\"body\":\"hello from Alice\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 12:36:31 GMT">>},
          {<<"content-type">>,<<"application/json">>}],
         <<>>,112,33705}
Params: #{body =>
              <<"{\"to\":\"bob_messages_are_archived_1731@domain.example.com\",\"caller\":\"alice_messages_are_archived_1731@domain.example.com\",\"body\":\"hello from Alice\"}">>,
          method => <<"POST">>,path => <<"/api/messages">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}

Could not find element wait_for_parallel_writer in Config.

Could not find element archive_wait in Config.


*** User 2022-01-27 12:36:31.539 ***
REST request:
Code: 200
Req: {<0.25165.1>,
      <<"/api/messages/alice_messages_are_archived_1731@domain.example.com/bob_messages_are_archived_1731@domain.example.com?limit=10">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"9a9b9a661b49f0ee">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 12:36:31 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"289">>}],
         <<"[{\"timestamp\":1643286991,\"sender\":\"bob_messages_are_archived_1731@domain.example.com\",\"message_id\":\"aa370cc205131883\",\"body\":\"hello from Bob\"},{\"timestamp\":1643286991,\"sender\":\"alice_messages_are_archived_1731@domain.example.com\",\"message_id\":\"ff977d60b003009b\",\"body\":\"hello from Alice\"}]">>,
         414,28143}
Params: #{body => <<>>,method => <<"GET">>,
          path =>
              <<"/api/messages/alice_messages_are_archived_1731@domain.example.com/bob_messages_are_archived_1731@domain.example.com?limit=10">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}

Could not find element wait_for_parallel_writer in Config.


*** User 2022-01-27 12:36:31.546 ***
REST request:
Code: 200
Req: {<0.25167.1>,
      <<"/api/messages/alice_messages_are_archived_1731@domain.example.com/bob_messages_are_archived_1731@domain.example.com">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"d615bb19e67bb647">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 12:36:31 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"289">>}],
         <<"[{\"timestamp\":1643286991,\"sender\":\"bob_messages_are_archived_1731@domain.example.com\",\"message_id\":\"aa370cc205131883\",\"body\":\"hello from Bob\"},{\"timestamp\":1643286991,\"sender\":\"alice_messages_are_archived_1731@domain.example.com\",\"message_id\":\"ff977d60b003009b\",\"body\":\"hello from Alice\"}]">>,
         414,5670}
Params: #{body => <<>>,method => <<"GET">>,
          path =>
              <<"/api/messages/alice_messages_are_archived_1731@domain.example.com/bob_messages_are_archived_1731@domain.example.com">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}

Could not find element archive_wait in Config.


*** User 2022-01-27 12:36:31.560 ***
REST request:
Code: 200
Req: {<0.25169.1>,
      <<"/api/messages/alice_messages_are_archived_1731@domain.example.com">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"cce0912b30ef0a21">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 12:36:31 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"289">>}],
         <<"[{\"timestamp\":1643286991,\"sender\":\"bob_messages_are_archived_1731@domain.example.com\",\"message_id\":\"aa370cc205131883\",\"body\":\"hello from Bob\"},{\"timestamp\":1643286991,\"sender\":\"alice_messages_are_archived_1731@domain.example.com\",\"message_id\":\"ff977d60b003009b\",\"body\":\"hello from Alice\"}]">>,
         414,12552}
Params: #{body => <<>>,method => <<"GET">>,
          path =>
              <<"/api/messages/alice_messages_are_archived_1731@domain.example.com">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 12:36:31.560 ***
bOb_messages_are_archived_1731@domain.example.com/res1 out
</stream:stream>

*** User 2022-01-27 12:36:31.561 ***
bOb_messages_are_archived_1731@domain.example.com/res1 in
</stream:stream>

*** User 2022-01-27 12:36:31.561 ***
alicE_messages_are_archived_1731@domain.example.com/res1 out
</stream:stream>

*** User 2022-01-27 12:36:31.561 ***
alicE_messages_are_archived_1731@domain.example.com/res1 in
</stream:stream>
*** CT 2022-01-27 12:36:31.570 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_655.html
*** CT 2022-01-27 12:36:31.571 *** View log from node mongooseim@localhost when finished mongooseim@localhost_2363.html



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