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

=== Config value:

    [{watchdog,<0.105726.0>},
     {muc_light_host,<<"muclight.localhost">>},
     {mam_backend,rdbms},
     {preset,"odbc_mssql_mnesia"},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/rest_client_SUITE_data"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@d67ced1141dd.2024-04-16_10.12.40/big_tests.tests.rest_client_SUITE.logs/run.2024-04-16_10.31.23/rest_client_suite.add_contact_and_be_invited.235267.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@d67ced1141dd.2024-04-16_10.12.40/big_tests.tests.rest_client_SUITE.logs/run.2024-04-16_10.31.23/log_private/"},
     {{saved_modules,mongooseim@localhost,<<"localhost">>},
      #{mod_vcard =>
            #{matches => 30,
              host => {prefix,<<"vjud.">>},
              search => true,iqdisc => parallel,backend => rdbms},
        mod_roster =>
            #{iqdisc => one_queue,backend => rdbms,versioning => false,
              store_current_id => false},
        mod_sic => #{iqdisc => one_queue},
        mod_amp => #{},
        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_presence => #{},
        mod_disco =>
            #{iqdisc => one_queue,server_info => [],extra_domains => [],
              users_can_see_hidden_services => false},
        mod_stream_management =>
            #{buffer => true,ack => true,backend => mnesia,buffer_max => 100,
              ack_freq => 1,
              stale_h =>
                  #{enabled => false,repeat_after => 1800,geriatric => 3600},
              resume_timeout => 600},
        mod_adhoc => #{iqdisc => one_queue,report_commands_node => false},
        mod_bosh =>
            #{backend => mnesia,inactivity => 30,max_pause => 120,
              max_wait => infinity,server_acks => false},
        mod_cache_users =>
            #{strategy => fifo,number_of_segments => 5,time_to_live => 2},
        mod_carboncopy => #{iqdisc => no_queue}}}]

=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@d67ced1141dd.2024-04-16_10.12.40"

=== Started at 2024-04-16 10:31:25


*** CT 2024-04-16 10:31:25.873 *** View log from node mongooseim@localhost when started🔗 mongooseim@localhost_4751.html

*** User 2024-04-16 10:31:25.896 ***🔗
alicE_add_contact_and_be_invited_4189@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2024-04-16 10:31:25.897 ***🔗
alicE_add_contact_and_be_invited_4189@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='40e55f06af5ebdc6' from='localhost' version='1.0' xml:lang='en'>

*** User 2024-04-16 10:31:25.897 ***🔗
alicE_add_contact_and_be_invited_4189@localhost/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-04-16 10:31:25.897 ***🔗
alicE_add_contact_and_be_invited_4189@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX2FkZF9jb250YWN0X2FuZF9iZV9pbnZpdGVkXzQxODkAbWF0eWdyeXNh</auth>



*** User 2024-04-16 10:31:25.898 ***🔗
alicE_add_contact_and_be_invited_4189@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2024-04-16 10:31:25.898 ***🔗
alicE_add_contact_and_be_invited_4189@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2024-04-16 10:31:25.898 ***🔗
alicE_add_contact_and_be_invited_4189@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='cc9b2913f6830b60' from='localhost' version='1.0' xml:lang='en' to='alice_add_contact_and_be_invited_4189@localhost'>

*** User 2024-04-16 10:31:25.899 ***🔗
alicE_add_contact_and_be_invited_4189@localhost/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-04-16 10:31:25.899 ***🔗
alicE_add_contact_and_be_invited_4189@localhost/res1 out
<iq type='set' id='51636cc011136b38a89ce6fc419a6223'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2024-04-16 10:31:25.899 ***🔗
alicE_add_contact_and_be_invited_4189@localhost/res1 in
<iq id='51636cc011136b38a89ce6fc419a6223' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alice_add_contact_and_be_invited_4189@localhost/res1</jid>
	</bind>
</iq>



*** User 2024-04-16 10:31:25.899 ***🔗
alice_add_contact_and_be_invited_4189@localhost/res1 out
<iq type='set' id='a4d89d54c19eb8e6946c9f8ec170d985'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-16 10:31:25.899 ***🔗
alice_add_contact_and_be_invited_4189@localhost/res1 in
<iq from='localhost' to='alice_add_contact_and_be_invited_4189@localhost/res1' id='a4d89d54c19eb8e6946c9f8ec170d985' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-16 10:31:25.900 ***🔗
alice_add_contact_and_be_invited_4189@localhost/res1 out
<presence/>



*** User 2024-04-16 10:31:25.901 ***🔗
alice_add_contact_and_be_invited_4189@localhost/res1 in
<presence from='alice_add_contact_and_be_invited_4189@localhost/res1' to='alice_add_contact_and_be_invited_4189@localhost/res1'/>



*** User 2024-04-16 10:31:25.902 ***🔗
bOb_add_contact_and_be_invited_4189@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2024-04-16 10:31:25.902 ***🔗
bOb_add_contact_and_be_invited_4189@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='6a1e688011e7fb17' from='localhost' version='1.0' xml:lang='en'>

*** User 2024-04-16 10:31:25.903 ***🔗
bOb_add_contact_and_be_invited_4189@localhost/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-04-16 10:31:25.903 ***🔗
bOb_add_contact_and_be_invited_4189@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9hZGRfY29udGFjdF9hbmRfYmVfaW52aXRlZF80MTg5AG1ha3JvbGlrYQ==</auth>



*** User 2024-04-16 10:31:25.904 ***🔗
bOb_add_contact_and_be_invited_4189@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2024-04-16 10:31:25.904 ***🔗
bOb_add_contact_and_be_invited_4189@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2024-04-16 10:31:25.905 ***🔗
bOb_add_contact_and_be_invited_4189@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='9015ca0f1b3bf46e' from='localhost' version='1.0' xml:lang='en' to='bob_add_contact_and_be_invited_4189@localhost'>

*** User 2024-04-16 10:31:25.905 ***🔗
bOb_add_contact_and_be_invited_4189@localhost/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-04-16 10:31:25.905 ***🔗
bOb_add_contact_and_be_invited_4189@localhost/res1 out
<iq type='set' id='eb69b88dfe9e5af11867b115b4acee45'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2024-04-16 10:31:25.905 ***🔗
bOb_add_contact_and_be_invited_4189@localhost/res1 in
<iq id='eb69b88dfe9e5af11867b115b4acee45' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bob_add_contact_and_be_invited_4189@localhost/res1</jid>
	</bind>
</iq>



*** User 2024-04-16 10:31:25.905 ***🔗
bob_add_contact_and_be_invited_4189@localhost/res1 out
<iq type='set' id='3152da7e77c78c9b86bb63d7b67b2082'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-16 10:31:25.906 ***🔗
bob_add_contact_and_be_invited_4189@localhost/res1 in
<iq from='localhost' to='bob_add_contact_and_be_invited_4189@localhost/res1' id='3152da7e77c78c9b86bb63d7b67b2082' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-16 10:31:25.906 ***🔗
bob_add_contact_and_be_invited_4189@localhost/res1 out
<presence/>



*** User 2024-04-16 10:31:25.908 ***🔗
bob_add_contact_and_be_invited_4189@localhost/res1 in
<presence from='bob_add_contact_and_be_invited_4189@localhost/res1' to='bob_add_contact_and_be_invited_4189@localhost/res1'/>



*** User 2024-04-16 10:31:25.919 ***🔗
REST request:
Code: 200
Req: {<0.105791.0>,<<"/api/contacts">>,<<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"4af841d19308a8ef">>},
       {<<"authorization">>,
        <<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9iZV9pbnZpdGVkXzQxODlAbG9jYWxob3N0Om1ha3JvbGlrYQ==">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 16 Apr 2024 10:31:25 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"2">>}],
         <<"[]">>,125,5791}
Params: #{path => <<"/api/contacts">>,
          server => #{node => mongooseim@localhost},
          creds =>
              {<<"bob_add_contact_and_be_invited_4189@localhost">>,
               <<"makrolika">>},
          body => <<>>,role => client,method => <<"GET">>,
          return_headers => true}


*** User 2024-04-16 10:31:25.968 ***🔗
REST request:
Code: 204
Req: {<0.105827.0>,<<"/api/contacts">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"64ef1f77d6ca8384">>},
       {<<"authorization">>,
        <<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9iZV9pbnZpdGVkXzQxODlAbG9jYWxob3N0Om1ha3JvbGlrYQ==">>}],
      <<"{\"jid\":\"alice_add_contact_and_be_invited_4189@localhost\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 16 Apr 2024 10:31:25 GMT">>}],
         <<>>,80,43356}
Params: #{path => <<"/api/contacts">>,
          server => #{node => mongooseim@localhost},
          creds =>
              {<<"bob_add_contact_and_be_invited_4189@localhost">>,
               <<"makrolika">>},
          body =>
              <<"{\"jid\":\"alice_add_contact_and_be_invited_4189@localhost\"}">>,
          role => client,method => <<"POST">>,return_headers => true}


*** User 2024-04-16 10:31:25.968 ***🔗
bob_add_contact_and_be_invited_4189@localhost/res1 in
<iq from='bob_add_contact_and_be_invited_4189@localhost' to='bob_add_contact_and_be_invited_4189@localhost/res1' id='push42074f47ca85106c' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item jid='alice_add_contact_and_be_invited_4189@localhost' subscription='none'/>
	</query>
</iq>



*** User 2024-04-16 10:31:25.979 ***🔗
REST request:
Code: 200
Req: {<0.105853.0>,<<"/api/contacts">>,<<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"cebe3ff32bbe288e">>},
       {<<"authorization">>,
        <<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9iZV9pbnZpdGVkXzQxODlAbG9jYWxob3N0Om1ha3JvbGlrYQ==">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 16 Apr 2024 10:31:25 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"94">>}],
         <<"[{\"ask\":\"none\",\"subscription\":\"none\",\"jid\":\"alice_add_contact_and_be_invited_4189@localhost\"}]">>,
         218,4641}
Params: #{path => <<"/api/contacts">>,
          server => #{node => mongooseim@localhost},
          creds =>
              {<<"bob_add_contact_and_be_invited_4189@localhost">>,
               <<"makrolika">>},
          body => <<>>,role => client,method => <<"GET">>,
          return_headers => true}


*** User 2024-04-16 10:31:25.979 ***🔗
alice_add_contact_and_be_invited_4189@localhost/res1 out
<iq type='set' id='115e56b3895af902a14d9342db2c4b86'>
	<query xmlns='jabber:iq:roster'>
		<item jid='bob_add_contact_and_be_invited_4189@localhost' name='Bobek'/>
	</query>
</iq>



*** User 2024-04-16 10:31:25.985 ***🔗
alice_add_contact_and_be_invited_4189@localhost/res1 in
<iq from='alice_add_contact_and_be_invited_4189@localhost' to='alice_add_contact_and_be_invited_4189@localhost/res1' id='push8c53327ae73f70ec' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item name='Bobek' jid='bob_add_contact_and_be_invited_4189@localhost' subscription='none'/>
	</query>
</iq>



*** User 2024-04-16 10:31:25.986 ***🔗
alice_add_contact_and_be_invited_4189@localhost/res1 in
<iq from='alice_add_contact_and_be_invited_4189@localhost' to='alice_add_contact_and_be_invited_4189@localhost/res1' id='115e56b3895af902a14d9342db2c4b86' type='result'/>



*** User 2024-04-16 10:31:25.986 ***🔗
alice_add_contact_and_be_invited_4189@localhost/res1 out
<presence type='subscribe' to='bob_add_contact_and_be_invited_4189@localhost'/>



*** User 2024-04-16 10:31:26.019 ***🔗
alice_add_contact_and_be_invited_4189@localhost/res1 in
<iq from='alice_add_contact_and_be_invited_4189@localhost' to='alice_add_contact_and_be_invited_4189@localhost/res1' id='push7bc5379713da564f' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item name='Bobek' ask='subscribe' jid='bob_add_contact_and_be_invited_4189@localhost' subscription='none'/>
	</query>
</iq>



*** User 2024-04-16 10:31:26.019 ***🔗
bob_add_contact_and_be_invited_4189@localhost/res1 in
<presence from='alice_add_contact_and_be_invited_4189@localhost' to='bob_add_contact_and_be_invited_4189@localhost/res1' type='subscribe'/>



*** User 2024-04-16 10:31:26.081 ***🔗
REST request:
Code: 200
Req: {<0.105941.0>,<<"/api/contacts">>,<<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"4751edcbb196bafa">>},
       {<<"authorization">>,
        <<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9iZV9pbnZpdGVkXzQxODlAbG9jYWxob3N0Om1ha3JvbGlrYQ==">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 16 Apr 2024 10:31:25 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"92">>}],
         <<"[{\"ask\":\"in\",\"subscription\":\"none\",\"jid\":\"alice_add_contact_and_be_invited_4189@localhost\"}]">>,
         216,19191}
Params: #{path => <<"/api/contacts">>,
          server => #{node => mongooseim@localhost},
          creds =>
              {<<"bob_add_contact_and_be_invited_4189@localhost">>,
               <<"makrolika">>},
          body => <<>>,role => client,method => <<"GET">>,
          return_headers => true}


*** User 2024-04-16 10:31:26.096 ***🔗
REST request:
Code: 204
Req: {<0.105971.0>,
      <<"/api/contacts/alice_add_contact_and_be_invited_4189@localhost">>,
      <<"PUT">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"474535c2e00b453d">>},
       {<<"authorization">>,
        <<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9iZV9pbnZpdGVkXzQxODlAbG9jYWxob3N0Om1ha3JvbGlrYQ==">>}],
      <<"{\"action\":\"accept\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 16 Apr 2024 10:31:25 GMT">>}],
         <<>>,80,8628}
Params: #{path =>
              <<"/api/contacts/alice_add_contact_and_be_invited_4189@localhost">>,
          server => #{node => mongooseim@localhost},
          creds =>
              {<<"bob_add_contact_and_be_invited_4189@localhost">>,
               <<"makrolika">>},
          body => <<"{\"action\":\"accept\"}">>,role => client,
          method => <<"PUT">>,return_headers => true}


*** User 2024-04-16 10:31:26.097 ***🔗
bob_add_contact_and_be_invited_4189@localhost/res1 in
<iq from='bob_add_contact_and_be_invited_4189@localhost' to='bob_add_contact_and_be_invited_4189@localhost/res1' id='push1a86f1d07e2c0ceb' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item jid='alice_add_contact_and_be_invited_4189@localhost' subscription='from'/>
	</query>
</iq>



*** User 2024-04-16 10:31:26.097 ***🔗
alice_add_contact_and_be_invited_4189@localhost/res1 in
<presence from='bob_add_contact_and_be_invited_4189@localhost/res1' to='alice_add_contact_and_be_invited_4189@localhost/res1'/>



*** User 2024-04-16 10:31:26.097 ***🔗
alice_add_contact_and_be_invited_4189@localhost/res1 in
<iq from='alice_add_contact_and_be_invited_4189@localhost' to='alice_add_contact_and_be_invited_4189@localhost/res1' id='push6b9fd16d1c35a3b0' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item name='Bobek' jid='bob_add_contact_and_be_invited_4189@localhost' subscription='to'/>
	</query>
</iq>



*** User 2024-04-16 10:31:26.097 ***🔗
alice_add_contact_and_be_invited_4189@localhost/res1 in
<presence from='bob_add_contact_and_be_invited_4189@localhost' to='alice_add_contact_and_be_invited_4189@localhost/res1' type='subscribed'/>



*** User 2024-04-16 10:31:26.097 ***🔗
bob_add_contact_and_be_invited_4189@localhost/res1 out
</stream:stream>

*** User 2024-04-16 10:31:26.098 ***🔗
bob_add_contact_and_be_invited_4189@localhost/res1 in
</stream:stream>

*** User 2024-04-16 10:31:26.098 ***🔗
alice_add_contact_and_be_invited_4189@localhost/res1 out
</stream:stream>

*** User 2024-04-16 10:31:26.098 ***🔗
alice_add_contact_and_be_invited_4189@localhost/res1 in
</stream:stream>
*** CT 2024-04-16 10:31:26.101 *** View log from node mongooseim@localhost when finished🔗 mongooseim@localhost_4751.html



=== Ended at 2024-04-16 10:31:26
=== successfully completed test case
=== === Returned value: ok