=== Test case: rest_client_SUITE:add_contact_and_be_invited/1 (click for source code)

=== Config value:

    [{watchdog,<0.21454.1>},
     {muc_light_host,<<"muclight.localhost">>},
     {mam_backend,riak},
     {archive_wait,2500},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/rest_client_SUITE_data"},
     {preset,"riak_mnesia"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@22b4515d438b.2022-04-05_07.43.19/big_tests.tests.rest_client_SUITE.logs/run.2022-04-05_07.57.09/rest_client_suite.add_contact_and_be_invited.35588.html"},
     {tc_group_properties,[{name,roster},parallel]},
     {tc_group_path,[]},
     {data_dir,"/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/rest_client_SUITE_data/"},
     {priv_dir,"/home/circleci/project/big_tests/ct_report/ct_run.test@22b4515d438b.2022-04-05_07.43.19/big_tests.tests.rest_client_SUITE.logs/run.2022-04-05_07.57.09/log_private/"},
     {{saved_modules,mongooseim@localhost,<<"localhost">>},
      #{mod_adhoc => #{iqdisc => one_queue,report_commands_node => false},
        mod_amp => [],
        mod_bosh =>
            #{backend => mnesia,inactivity => 30,max_pause => 120,
              max_wait => infinity,server_acks => false},
        mod_cache_users =>
            #{number_of_segments => 5,strategy => fifo,time_to_live => 2},
        mod_carboncopy => [],mod_commands => [],
        mod_disco =>
            #{extra_domains => [],iqdisc => one_queue,server_info => [],
              users_can_see_hidden_services => false},
        mod_muc_commands => [],mod_muc_light_commands => [],
        mod_register =>
            [{access,register},
             {ip_access,[{allow,"127.0.0.0/8"},{deny,"0.0.0.0/0"}]},
             {welcome_message,{[],[]}}],
        mod_roster =>
            #{backend => riak,iqdisc => one_queue,
              riak =>
                  #{bucket_type => <<"rosters">>,
                    version_bucket_type => <<"roster_versions">>},
              store_current_id => false,versioning => false},
        mod_sic => #{iqdisc => one_queue},
        mod_stream_management =>
            #{ack => true,ack_freq => 1,backend => mnesia,buffer => true,
              buffer_max => 100,resume_timeout => 600,
              stale_h =>
                  #{enabled => false,geriatric => 3600,repeat_after => 1800}},
        mod_vcard =>
            #{backend => riak,
              host => {prefix,<<"vjud.">>},
              iqdisc => parallel,matches => 30,
              riak =>
                  #{bucket_type => <<"vcard">>,search_index => <<"vcard">>},
              search => true}}}]

=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@22b4515d438b.2022-04-05_07.43.19"

=== Started at 2022-04-05 07:57:31


*** CT 2022-04-05 07:57:31.896 *** View log from node mongooseim@localhost when started mongooseim@localhost_5070.html
*** CT 2022-04-05 07:57:31.897 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_2005.html

*** User 2022-04-05 07:57:31.930 ***
alicE_add_contact_and_be_invited_1644@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-04-05 07:57:31.931 ***
alicE_add_contact_and_be_invited_1644@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='9c6308e40cdc724a' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-04-05 07:57:31.932 ***
alicE_add_contact_and_be_invited_1644@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-04-05 07:57:31.932 ***
alicE_add_contact_and_be_invited_1644@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX2FkZF9jb250YWN0X2FuZF9iZV9pbnZpdGVkXzE2NDQAbWF0eWdyeXNh</auth>



*** User 2022-04-05 07:57:31.940 ***
alicE_add_contact_and_be_invited_1644@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-04-05 07:57:31.940 ***
alicE_add_contact_and_be_invited_1644@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-04-05 07:57:31.941 ***
alicE_add_contact_and_be_invited_1644@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='36cacaa322f7feff' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-04-05 07:57:31.941 ***
alicE_add_contact_and_be_invited_1644@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-04-05 07:57:31.941 ***
alicE_add_contact_and_be_invited_1644@localhost/res1 out
<iq type='set' id='4c6c05d2f99c2f3eb71993980420e639'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-04-05 07:57:31.945 ***
alicE_add_contact_and_be_invited_1644@localhost/res1 in
<iq id='4c6c05d2f99c2f3eb71993980420e639' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alicE_add_contact_and_be_invited_1644@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-04-05 07:57:31.946 ***
alicE_add_contact_and_be_invited_1644@localhost/res1 out
<iq type='set' id='ef5fd9cf463808498c0d6c486c7627a0'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-04-05 07:57:31.946 ***
alicE_add_contact_and_be_invited_1644@localhost/res1 in
<iq type='result' id='ef5fd9cf463808498c0d6c486c7627a0'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-04-05 07:57:31.946 ***
alicE_add_contact_and_be_invited_1644@localhost/res1 out
<presence/>



*** User 2022-04-05 07:57:31.971 ***
alicE_add_contact_and_be_invited_1644@localhost/res1 in
<presence from='alicE_add_contact_and_be_invited_1644@localhost/res1' to='alice_add_contact_and_be_invited_1644@localhost/res1' xml:lang='en'/>



*** User 2022-04-05 07:57:31.973 ***
bOb_add_contact_and_be_invited_1644@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-04-05 07:57:31.978 ***
bOb_add_contact_and_be_invited_1644@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='98d3ce4ec64cc277' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-04-05 07:57:31.979 ***
bOb_add_contact_and_be_invited_1644@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-04-05 07:57:31.979 ***
bOb_add_contact_and_be_invited_1644@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9hZGRfY29udGFjdF9hbmRfYmVfaW52aXRlZF8xNjQ0AG1ha3JvbGlrYQ==</auth>



*** User 2022-04-05 07:57:31.983 ***
bOb_add_contact_and_be_invited_1644@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-04-05 07:57:31.983 ***
bOb_add_contact_and_be_invited_1644@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-04-05 07:57:31.983 ***
bOb_add_contact_and_be_invited_1644@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='7ab94cf59566b581' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-04-05 07:57:31.984 ***
bOb_add_contact_and_be_invited_1644@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-04-05 07:57:31.984 ***
bOb_add_contact_and_be_invited_1644@localhost/res1 out
<iq type='set' id='2c4e8b5d70c6db4c6f275dc3f2f43f53'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-04-05 07:57:31.985 ***
bOb_add_contact_and_be_invited_1644@localhost/res1 in
<iq id='2c4e8b5d70c6db4c6f275dc3f2f43f53' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bOb_add_contact_and_be_invited_1644@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-04-05 07:57:31.985 ***
bOb_add_contact_and_be_invited_1644@localhost/res1 out
<iq type='set' id='3c69f353d047b9db3b2e633abe6f6bbb'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-04-05 07:57:31.986 ***
bOb_add_contact_and_be_invited_1644@localhost/res1 in
<iq type='result' id='3c69f353d047b9db3b2e633abe6f6bbb'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-04-05 07:57:31.986 ***
bOb_add_contact_and_be_invited_1644@localhost/res1 out
<presence/>



*** User 2022-04-05 07:57:32.004 ***
bOb_add_contact_and_be_invited_1644@localhost/res1 in
<presence from='bOb_add_contact_and_be_invited_1644@localhost/res1' to='bob_add_contact_and_be_invited_1644@localhost/res1' xml:lang='en'/>



*** User 2022-04-05 07:57:32.093 ***
REST request:
Code: 200
Req: {<0.21542.1>,<<"/api/contacts">>,<<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"9bd30855031c4139">>},
       {<<"authorization">>,
        <<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9iZV9pbnZpdGVkXzE2NDRAbG9jYWxob3N0Om1ha3JvbGlrYQ==">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 05 Apr 2022 07:57:31 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"2">>}],
         <<"[]">>,125,23104}
Params: #{body => <<>>,
          creds =>
              {<<"bob_add_contact_and_be_invited_1644@localhost">>,
               <<"makrolika">>},
          method => <<"GET">>,path => <<"/api/contacts">>,
          return_headers => true,role => client,
          server => #{node => mongooseim@localhost}}


*** User 2022-04-05 07:57:32.132 ***
REST request:
Code: 204
Req: {<0.21561.1>,<<"/api/contacts">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"980e1f304833f531">>},
       {<<"authorization">>,
        <<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9iZV9pbnZpdGVkXzE2NDRAbG9jYWxob3N0Om1ha3JvbGlrYQ==">>}],
      <<"{\"jid\":\"alice_add_contact_and_be_invited_1644@localhost\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 05 Apr 2022 07:57:31 GMT">>}],
         <<>>,80,25005}
Params: #{body =>
              <<"{\"jid\":\"alice_add_contact_and_be_invited_1644@localhost\"}">>,
          creds =>
              {<<"bob_add_contact_and_be_invited_1644@localhost">>,
               <<"makrolika">>},
          method => <<"POST">>,path => <<"/api/contacts">>,
          return_headers => true,role => client,
          server => #{node => mongooseim@localhost}}


*** User 2022-04-05 07:57:32.133 ***
bOb_add_contact_and_be_invited_1644@localhost/res1 in
<iq from='bob_add_contact_and_be_invited_1644@localhost' to='bob_add_contact_and_be_invited_1644@localhost/res1' id='push30c8950ed0b63823' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='none' jid='alice_add_contact_and_be_invited_1644@localhost'/>
	</query>
</iq>



*** User 2022-04-05 07:57:32.186 ***
REST request:
Code: 200
Req: {<0.21580.1>,<<"/api/contacts">>,<<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"2b2f19df3ffd800c">>},
       {<<"authorization">>,
        <<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9iZV9pbnZpdGVkXzE2NDRAbG9jYWxob3N0Om1ha3JvbGlrYQ==">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 05 Apr 2022 07:57:31 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"94">>}],
         <<"[{\"subscription\":\"none\",\"jid\":\"alice_add_contact_and_be_invited_1644@localhost\",\"ask\":\"none\"}]">>,
         218,10349}
Params: #{body => <<>>,
          creds =>
              {<<"bob_add_contact_and_be_invited_1644@localhost">>,
               <<"makrolika">>},
          method => <<"GET">>,path => <<"/api/contacts">>,
          return_headers => true,role => client,
          server => #{node => mongooseim@localhost}}


*** User 2022-04-05 07:57:32.186 ***
alicE_add_contact_and_be_invited_1644@localhost/res1 out
<iq type='set' id='58e8de1b07cb630769026023900f54ee'>
	<query xmlns='jabber:iq:roster'>
		<item jid='bOb_add_contact_and_be_invited_1644@localhost' name='Bobek'/>
	</query>
</iq>



*** User 2022-04-05 07:57:32.200 ***
alicE_add_contact_and_be_invited_1644@localhost/res1 in
<iq from='alicE_add_contact_and_be_invited_1644@localhost' to='alicE_add_contact_and_be_invited_1644@localhost/res1' id='push7f27b42a276613bb' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='none' name='Bobek' jid='bob_add_contact_and_be_invited_1644@localhost'/>
	</query>
</iq>



*** User 2022-04-05 07:57:32.200 ***
alicE_add_contact_and_be_invited_1644@localhost/res1 in
<iq from='alicE_add_contact_and_be_invited_1644@localhost' to='alicE_add_contact_and_be_invited_1644@localhost/res1' id='58e8de1b07cb630769026023900f54ee' type='result'/>



*** User 2022-04-05 07:57:32.200 ***
alicE_add_contact_and_be_invited_1644@localhost/res1 out
<presence type='subscribe' to='bOb_add_contact_and_be_invited_1644@localhost'/>



*** User 2022-04-05 07:57:32.278 ***
alicE_add_contact_and_be_invited_1644@localhost/res1 in
<iq from='alicE_add_contact_and_be_invited_1644@localhost' to='alicE_add_contact_and_be_invited_1644@localhost/res1' id='pushece8333bbdb878ad' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item ask='subscribe' subscription='none' name='Bobek' jid='bob_add_contact_and_be_invited_1644@localhost'/>
	</query>
</iq>



*** User 2022-04-05 07:57:32.278 ***
bOb_add_contact_and_be_invited_1644@localhost/res1 in
<presence from='alicE_add_contact_and_be_invited_1644@localhost' to='bOb_add_contact_and_be_invited_1644@localhost/res1' xml:lang='en' type='subscribe'/>



*** User 2022-04-05 07:57:32.295 ***
REST request:
Code: 200
Req: {<0.21629.1>,<<"/api/contacts">>,<<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"ee8e3352a739f5f0">>},
       {<<"authorization">>,
        <<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9iZV9pbnZpdGVkXzE2NDRAbG9jYWxob3N0Om1ha3JvbGlrYQ==">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 05 Apr 2022 07:57:32 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"92">>}],
         <<"[{\"subscription\":\"none\",\"jid\":\"alice_add_contact_and_be_invited_1644@localhost\",\"ask\":\"in\"}]">>,
         216,5201}
Params: #{body => <<>>,
          creds =>
              {<<"bob_add_contact_and_be_invited_1644@localhost">>,
               <<"makrolika">>},
          method => <<"GET">>,path => <<"/api/contacts">>,
          return_headers => true,role => client,
          server => #{node => mongooseim@localhost}}


*** User 2022-04-05 07:57:32.408 ***
REST request:
Code: 204
Req: {<0.21654.1>,
      <<"/api/contacts/alice_add_contact_and_be_invited_1644@localhost">>,
      <<"PUT">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"0297faeda383245c">>},
       {<<"authorization">>,
        <<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9iZV9pbnZpdGVkXzE2NDRAbG9jYWxob3N0Om1ha3JvbGlrYQ==">>}],
      <<"{\"action\":\"accept\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 05 Apr 2022 07:57:32 GMT">>}],
         <<>>,80,46350}
Params: #{body => <<"{\"action\":\"accept\"}">>,
          creds =>
              {<<"bob_add_contact_and_be_invited_1644@localhost">>,
               <<"makrolika">>},
          method => <<"PUT">>,
          path =>
              <<"/api/contacts/alice_add_contact_and_be_invited_1644@localhost">>,
          return_headers => true,role => client,
          server => #{node => mongooseim@localhost}}


*** User 2022-04-05 07:57:32.408 ***
bOb_add_contact_and_be_invited_1644@localhost/res1 in
<iq from='bob_add_contact_and_be_invited_1644@localhost' to='bob_add_contact_and_be_invited_1644@localhost/res1' id='push8ce46a0a2bd83479' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='from' jid='alice_add_contact_and_be_invited_1644@localhost'/>
	</query>
</iq>



*** User 2022-04-05 07:57:32.409 ***
alicE_add_contact_and_be_invited_1644@localhost/res1 in
<presence from='bOb_add_contact_and_be_invited_1644@localhost/res1' to='alice_add_contact_and_be_invited_1644@localhost/res1' xml:lang='en'/>



*** User 2022-04-05 07:57:32.409 ***
alicE_add_contact_and_be_invited_1644@localhost/res1 in
<iq from='alice_add_contact_and_be_invited_1644@localhost' to='alice_add_contact_and_be_invited_1644@localhost/res1' id='push6bcc9892b51d5c41' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='to' name='Bobek' jid='bob_add_contact_and_be_invited_1644@localhost'/>
	</query>
</iq>



*** User 2022-04-05 07:57:32.409 ***
alicE_add_contact_and_be_invited_1644@localhost/res1 in
<presence from='bob_add_contact_and_be_invited_1644@localhost' to='alice_add_contact_and_be_invited_1644@localhost/res1' type='subscribed'/>



*** User 2022-04-05 07:57:32.409 ***
bOb_add_contact_and_be_invited_1644@localhost/res1 out
</stream:stream>

*** User 2022-04-05 07:57:32.413 ***
bOb_add_contact_and_be_invited_1644@localhost/res1 in
</stream:stream>

*** User 2022-04-05 07:57:32.413 ***
alicE_add_contact_and_be_invited_1644@localhost/res1 out
</stream:stream>

*** User 2022-04-05 07:57:32.415 ***
alicE_add_contact_and_be_invited_1644@localhost/res1 in
</stream:stream>
*** CT 2022-04-05 07:57:32.417 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_2005.html
*** CT 2022-04-05 07:57:32.419 *** View log from node mongooseim@localhost when finished mongooseim@localhost_5070.html



=== Ended at 2022-04-05 07:57:32
=== successfully completed test case
=== === Returned value: ok