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

=== Config value:

    [{watchdog,<0.75175.0>},
     {{ejabberd_cwd,mongooseim@localhost},
      "/home/circleci/project/_build/mim1/rel/mongooseim"},
     {mam_backend,rdbms},
     {preset,"odbc_mssql_mnesia"},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/rest_SUITE_data"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@a0c40f52f50c.2024-03-21_07.45.55/big_tests.tests.rest_SUITE.logs/run.2024-03-21_08.00.22/rest_suite.messages_are_archived.223618.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@a0c40f52f50c.2024-03-21_07.45.55/big_tests.tests.rest_SUITE.logs/run.2024-03-21_08.00.22/log_private/"},
     {{saved_modules,mongooseim@localhost,<<"test type">>},
      #{mod_vcard =>
            #{matches => 30,
              host => {prefix,<<"vjud.">>},
              search => true,backend => rdbms,iqdisc => parallel},
        mod_roster =>
            #{backend => rdbms,iqdisc => one_queue,versioning => false,
              store_current_id => false},
        mod_amp => #{},
        mod_sic => #{iqdisc => one_queue},
        mod_register =>
            #{access => register,iqdisc => one_queue,
              registration_watchers => [],password_strength => 0,
              ip_access => [{allow,"127.0.0.0/8"},{deny,"0.0.0.0/0"}]},
        mod_disco =>
            #{iqdisc => one_queue,server_info => [],extra_domains => [],
              users_can_see_hidden_services => false},
        mod_presence => #{},
        mod_stream_management =>
            #{buffer => true,ack => true,buffer_max => 100,ack_freq => 1,
              stale_h =>
                  #{enabled => false,repeat_after => 1800,geriatric => 3600},
              resume_timeout => 600,backend => mnesia},
        mod_adhoc => #{iqdisc => one_queue,report_commands_node => false},
        mod_cache_users =>
            #{strategy => fifo,number_of_segments => 5,time_to_live => 2},
        mod_bosh =>
            #{backend => mnesia,inactivity => 30,max_pause => 120,
              max_wait => infinity,server_acks => false},
        mod_carboncopy => #{iqdisc => no_queue}}},
     {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@a0c40f52f50c.2024-03-21_07.45.55"

=== Started at 2024-03-21 08:00:22


*** CT 2024-03-21 08:00:22.489 *** View log from node mongooseim@localhost when started🔗 mongooseim@localhost_3618.html

*** User 2024-03-21 08:00:22.576 ***🔗
alicE_messages_are_archived_2915@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 2024-03-21 08:00:22.577 ***🔗
alicE_messages_are_archived_2915@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='e6505683b7cce9a9' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2024-03-21 08:00:22.577 ***🔗
alicE_messages_are_archived_2915@domain.example.com/res1 in
<stream:features>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
	<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
		<mechanism>SCRAM-SHA-256</mechanism>
		<mechanism>PLAIN</mechanism>
	</mechanisms>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2024-03-21 08:00:22.577 ***🔗
alicE_messages_are_archived_2915@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX21lc3NhZ2VzX2FyZV9hcmNoaXZlZF8yOTE1AG1hdHlncnlzYQ==</auth>



*** User 2024-03-21 08:00:22.579 ***🔗
alicE_messages_are_archived_2915@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2024-03-21 08:00:22.579 ***🔗
alicE_messages_are_archived_2915@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 2024-03-21 08:00:22.580 ***🔗
alicE_messages_are_archived_2915@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='c110e64fdb24b84b' from='domain.example.com' version='1.0' xml:lang='en' to='alice_messages_are_archived_2915@domain.example.com'>

*** User 2024-03-21 08:00:22.580 ***🔗
alicE_messages_are_archived_2915@domain.example.com/res1 in
<stream:features>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2024-03-21 08:00:22.580 ***🔗
alicE_messages_are_archived_2915@domain.example.com/res1 out
<iq type='set' id='d1435fa500e27900eac579ab64af110b'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2024-03-21 08:00:22.580 ***🔗
alicE_messages_are_archived_2915@domain.example.com/res1 in
<iq id='d1435fa500e27900eac579ab64af110b' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alice_messages_are_archived_2915@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2024-03-21 08:00:22.580 ***🔗
alice_messages_are_archived_2915@domain.example.com/res1 out
<iq type='set' id='a2378ce012908b91f270f7168f52a127'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-03-21 08:00:22.581 ***🔗
alice_messages_are_archived_2915@domain.example.com/res1 in
<iq from='domain.example.com' to='alice_messages_are_archived_2915@domain.example.com/res1' id='a2378ce012908b91f270f7168f52a127' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-03-21 08:00:22.581 ***🔗
alice_messages_are_archived_2915@domain.example.com/res1 out
<presence/>



*** User 2024-03-21 08:00:22.585 ***🔗
alice_messages_are_archived_2915@domain.example.com/res1 in
<presence from='alice_messages_are_archived_2915@domain.example.com/res1' to='alice_messages_are_archived_2915@domain.example.com/res1'/>



*** User 2024-03-21 08:00:22.585 ***🔗
bOb_messages_are_archived_2915@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 2024-03-21 08:00:22.586 ***🔗
bOb_messages_are_archived_2915@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='42f7b023822e1460' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2024-03-21 08:00:22.587 ***🔗
bOb_messages_are_archived_2915@domain.example.com/res1 in
<stream:features>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
	<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
		<mechanism>SCRAM-SHA-256</mechanism>
		<mechanism>PLAIN</mechanism>
	</mechanisms>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2024-03-21 08:00:22.587 ***🔗
bOb_messages_are_archived_2915@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9tZXNzYWdlc19hcmVfYXJjaGl2ZWRfMjkxNQBtYWtyb2xpa2E=</auth>



*** User 2024-03-21 08:00:22.589 ***🔗
bOb_messages_are_archived_2915@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2024-03-21 08:00:22.589 ***🔗
bOb_messages_are_archived_2915@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 2024-03-21 08:00:22.589 ***🔗
bOb_messages_are_archived_2915@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='461fa2708ddd9091' from='domain.example.com' version='1.0' xml:lang='en' to='bob_messages_are_archived_2915@domain.example.com'>

*** User 2024-03-21 08:00:22.589 ***🔗
bOb_messages_are_archived_2915@domain.example.com/res1 in
<stream:features>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2024-03-21 08:00:22.589 ***🔗
bOb_messages_are_archived_2915@domain.example.com/res1 out
<iq type='set' id='649b32675e4c77ef412bfdcd237864ca'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2024-03-21 08:00:22.590 ***🔗
bOb_messages_are_archived_2915@domain.example.com/res1 in
<iq id='649b32675e4c77ef412bfdcd237864ca' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bob_messages_are_archived_2915@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2024-03-21 08:00:22.590 ***🔗
bob_messages_are_archived_2915@domain.example.com/res1 out
<iq type='set' id='d08f6bc5e52ba6d822cf4bc30de33720'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-03-21 08:00:22.591 ***🔗
bob_messages_are_archived_2915@domain.example.com/res1 in
<iq from='domain.example.com' to='bob_messages_are_archived_2915@domain.example.com/res1' id='d08f6bc5e52ba6d822cf4bc30de33720' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-03-21 08:00:22.591 ***🔗
bob_messages_are_archived_2915@domain.example.com/res1 out
<presence/>



*** User 2024-03-21 08:00:22.657 ***🔗
bob_messages_are_archived_2915@domain.example.com/res1 in
<presence from='bob_messages_are_archived_2915@domain.example.com/res1' to='bob_messages_are_archived_2915@domain.example.com/res1'/>



*** User 2024-03-21 08:00:22.676 ***🔗
REST request:
Code: 204
Req: {<0.75482.0>,<<"/api/messages">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"9dd7fa036e7e03df">>}],
      <<"{\"body\":\"hello from Bob\",\"to\":\"alice_messages_are_archived_2915@domain.example.com\",\"caller\":\"bob_messages_are_archived_2915@domain.example.com\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 21 Mar 2024 08:00:22 GMT">>}],
         <<>>,80,16602}
Params: #{path => <<"/api/messages">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,role => admin,
          body =>
              <<"{\"body\":\"hello from Bob\",\"to\":\"alice_messages_are_archived_2915@domain.example.com\",\"caller\":\"bob_messages_are_archived_2915@domain.example.com\"}">>,
          return_headers => true}

Could not find element wait_for_parallel_writer in Config.

Could not find element archive_wait in Config.


*** User 2024-03-21 08:00:22.679 ***🔗
REST request:
Code: 204
Req: {<0.75501.0>,<<"/api/messages">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"d3a9e36cc811f8ff">>}],
      <<"{\"body\":\"hello from Alice\",\"to\":\"bob_messages_are_archived_2915@domain.example.com\",\"caller\":\"alice_messages_are_archived_2915@domain.example.com\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 21 Mar 2024 08:00:22 GMT">>}],
         <<>>,80,2318}
Params: #{path => <<"/api/messages">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,role => admin,
          body =>
              <<"{\"body\":\"hello from Alice\",\"to\":\"bob_messages_are_archived_2915@domain.example.com\",\"caller\":\"alice_messages_are_archived_2915@domain.example.com\"}">>,
          return_headers => true}

Could not find element wait_for_parallel_writer in Config.

Could not find element archive_wait in Config.


*** User 2024-03-21 08:00:22.696 ***🔗
REST request:
Code: 200
Req: {<0.75510.0>,
      <<"/api/messages/alice_messages_are_archived_2915@domain.example.com/bob_messages_are_archived_2915@domain.example.com?limit=10">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"1d939abaec5b16da">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 21 Mar 2024 08:00:22 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"289">>}],
         <<"[{\"sender\":\"bob_messages_are_archived_2915@domain.example.com\",\"message_id\":\"d9eb4aab439887c7\",\"body\":\"hello from Bob\",\"timestamp\":1711008023},{\"sender\":\"alice_messages_are_archived_2915@domain.example.com\",\"message_id\":\"1f93418cedea0377\",\"body\":\"hello from Alice\",\"timestamp\":1711008023}]">>,
         414,15076}
Params: #{path =>
              <<"/api/messages/alice_messages_are_archived_2915@domain.example.com/bob_messages_are_archived_2915@domain.example.com?limit=10">>,
          server => #{node => mongooseim@localhost},
          method => <<"GET">>,role => admin,body => <<>>,
          return_headers => true}

Could not find element wait_for_parallel_writer in Config.

Could not find element archive_wait in Config.


*** User 2024-03-21 08:00:22.699 ***🔗
REST request:
Code: 200
Req: {<0.75518.0>,
      <<"/api/messages/alice_messages_are_archived_2915@domain.example.com/bob_messages_are_archived_2915@domain.example.com">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"93f795129d3fbf11">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 21 Mar 2024 08:00:22 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"289">>}],
         <<"[{\"sender\":\"bob_messages_are_archived_2915@domain.example.com\",\"message_id\":\"d9eb4aab439887c7\",\"body\":\"hello from Bob\",\"timestamp\":1711008023},{\"sender\":\"alice_messages_are_archived_2915@domain.example.com\",\"message_id\":\"1f93418cedea0377\",\"body\":\"hello from Alice\",\"timestamp\":1711008023}]">>,
         414,1941}
Params: #{path =>
              <<"/api/messages/alice_messages_are_archived_2915@domain.example.com/bob_messages_are_archived_2915@domain.example.com">>,
          server => #{node => mongooseim@localhost},
          method => <<"GET">>,role => admin,body => <<>>,
          return_headers => true}


*** User 2024-03-21 08:00:22.701 ***🔗
REST request:
Code: 200
Req: {<0.75520.0>,
      <<"/api/messages/alice_messages_are_archived_2915@domain.example.com">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"ad1cbae1263526fb">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 21 Mar 2024 08:00:22 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"289">>}],
         <<"[{\"sender\":\"bob_messages_are_archived_2915@domain.example.com\",\"message_id\":\"d9eb4aab439887c7\",\"body\":\"hello from Bob\",\"timestamp\":1711008023},{\"sender\":\"alice_messages_are_archived_2915@domain.example.com\",\"message_id\":\"1f93418cedea0377\",\"body\":\"hello from Alice\",\"timestamp\":1711008023}]">>,
         414,1693}
Params: #{path =>
              <<"/api/messages/alice_messages_are_archived_2915@domain.example.com">>,
          server => #{node => mongooseim@localhost},
          method => <<"GET">>,role => admin,body => <<>>,
          return_headers => true}


*** User 2024-03-21 08:00:22.701 ***🔗
bob_messages_are_archived_2915@domain.example.com/res1 out
</stream:stream>

*** User 2024-03-21 08:00:22.702 ***🔗
bob_messages_are_archived_2915@domain.example.com/res1 in
</stream:stream>

*** User 2024-03-21 08:00:22.702 ***🔗
alice_messages_are_archived_2915@domain.example.com/res1 out
</stream:stream>

*** User 2024-03-21 08:00:22.702 ***🔗
alice_messages_are_archived_2915@domain.example.com/res1 in
</stream:stream>
*** CT 2024-03-21 08:00:22.704 *** View log from node mongooseim@localhost when finished🔗 mongooseim@localhost_3618.html



=== Ended at 2024-03-21 08:00:22
=== successfully completed test case
=== === Returned value: ok