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

=== Config value:

    [{watchdog,<0.84984.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@e84896a28784.2023-12-20_12.31.47/big_tests.tests.rest_client_SUITE.logs/run.2023-12-20_12.48.35/rest_client_suite.add_contact_and_be_invited.90500.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@e84896a28784.2023-12-20_12.31.47/big_tests.tests.rest_client_SUITE.logs/run.2023-12-20_12.48.35/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_disco =>
            #{iqdisc => one_queue,users_can_see_hidden_services => false,
              server_info => [],extra_domains => []},
        mod_presence => #{},
        mod_stream_management =>
            #{buffer => true,ack => true,backend => mnesia,
              stale_h =>
                  #{enabled => false,repeat_after => 1800,geriatric => 3600},
              buffer_max => 100,ack_freq => 1,resume_timeout => 600},
        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}}}]

=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@e84896a28784.2023-12-20_12.31.47"

=== Started at 2023-12-20 12:48:37


*** CT 2023-12-20 12:48:37.666 *** View log from node mongooseim@localhost when started🔗 mongooseim@localhost_4766.html

*** User 2023-12-20 12:48:37.680 ***🔗
alicE_add_contact_and_be_invited_3097@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2023-12-20 12:48:37.680 ***🔗
alicE_add_contact_and_be_invited_3097@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='663b97d18672a0ef' from='localhost' version='1.0' xml:lang='en'>

*** User 2023-12-20 12:48:37.680 ***🔗
alicE_add_contact_and_be_invited_3097@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 2023-12-20 12:48:37.680 ***🔗
alicE_add_contact_and_be_invited_3097@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX2FkZF9jb250YWN0X2FuZF9iZV9pbnZpdGVkXzMwOTcAbWF0eWdyeXNh</auth>



*** User 2023-12-20 12:48:37.681 ***🔗
alicE_add_contact_and_be_invited_3097@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2023-12-20 12:48:37.681 ***🔗
alicE_add_contact_and_be_invited_3097@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2023-12-20 12:48:37.682 ***🔗
alicE_add_contact_and_be_invited_3097@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='159298e639350915' from='localhost' version='1.0' xml:lang='en' to='alice_add_contact_and_be_invited_3097@localhost'>

*** User 2023-12-20 12:48:37.682 ***🔗
alicE_add_contact_and_be_invited_3097@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 2023-12-20 12:48:37.682 ***🔗
alicE_add_contact_and_be_invited_3097@localhost/res1 out
<iq type='set' id='1b0186f3a4f7db544e577935a518dfa1'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2023-12-20 12:48:37.682 ***🔗
alicE_add_contact_and_be_invited_3097@localhost/res1 in
<iq id='1b0186f3a4f7db544e577935a518dfa1' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alice_add_contact_and_be_invited_3097@localhost/res1</jid>
	</bind>
</iq>



*** User 2023-12-20 12:48:37.682 ***🔗
alice_add_contact_and_be_invited_3097@localhost/res1 out
<iq type='set' id='905039de18e7b1d9364ce036e42c6621'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2023-12-20 12:48:37.683 ***🔗
alice_add_contact_and_be_invited_3097@localhost/res1 in
<iq from='localhost' to='alice_add_contact_and_be_invited_3097@localhost/res1' id='905039de18e7b1d9364ce036e42c6621' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2023-12-20 12:48:37.683 ***🔗
alice_add_contact_and_be_invited_3097@localhost/res1 out
<presence/>



*** User 2023-12-20 12:48:37.684 ***🔗
alice_add_contact_and_be_invited_3097@localhost/res1 in
<presence from='alice_add_contact_and_be_invited_3097@localhost/res1' to='alice_add_contact_and_be_invited_3097@localhost/res1'/>



*** User 2023-12-20 12:48:37.685 ***🔗
bOb_add_contact_and_be_invited_3097@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2023-12-20 12:48:37.685 ***🔗
bOb_add_contact_and_be_invited_3097@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='ab01e3c169da0b3d' from='localhost' version='1.0' xml:lang='en'>

*** User 2023-12-20 12:48:37.685 ***🔗
bOb_add_contact_and_be_invited_3097@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 2023-12-20 12:48:37.685 ***🔗
bOb_add_contact_and_be_invited_3097@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9hZGRfY29udGFjdF9hbmRfYmVfaW52aXRlZF8zMDk3AG1ha3JvbGlrYQ==</auth>



*** User 2023-12-20 12:48:37.686 ***🔗
bOb_add_contact_and_be_invited_3097@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2023-12-20 12:48:37.686 ***🔗
bOb_add_contact_and_be_invited_3097@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2023-12-20 12:48:37.687 ***🔗
bOb_add_contact_and_be_invited_3097@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='27dc61426c75a7a6' from='localhost' version='1.0' xml:lang='en' to='bob_add_contact_and_be_invited_3097@localhost'>

*** User 2023-12-20 12:48:37.687 ***🔗
bOb_add_contact_and_be_invited_3097@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 2023-12-20 12:48:37.687 ***🔗
bOb_add_contact_and_be_invited_3097@localhost/res1 out
<iq type='set' id='39f0e2c2c8bab20ca7ab3c168bcd2dfe'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2023-12-20 12:48:37.687 ***🔗
bOb_add_contact_and_be_invited_3097@localhost/res1 in
<iq id='39f0e2c2c8bab20ca7ab3c168bcd2dfe' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bob_add_contact_and_be_invited_3097@localhost/res1</jid>
	</bind>
</iq>



*** User 2023-12-20 12:48:37.687 ***🔗
bob_add_contact_and_be_invited_3097@localhost/res1 out
<iq type='set' id='1f21df176570aab65dd4955c0dd305ec'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2023-12-20 12:48:37.688 ***🔗
bob_add_contact_and_be_invited_3097@localhost/res1 in
<iq from='localhost' to='bob_add_contact_and_be_invited_3097@localhost/res1' id='1f21df176570aab65dd4955c0dd305ec' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2023-12-20 12:48:37.688 ***🔗
bob_add_contact_and_be_invited_3097@localhost/res1 out
<presence/>



*** User 2023-12-20 12:48:37.690 ***🔗
bob_add_contact_and_be_invited_3097@localhost/res1 in
<presence from='bob_add_contact_and_be_invited_3097@localhost/res1' to='bob_add_contact_and_be_invited_3097@localhost/res1'/>



*** User 2023-12-20 12:48:37.710 ***🔗
REST request:
Code: 200
Req: {<0.85051.0>,<<"/api/contacts">>,<<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"f8d1135361be814c">>},
       {<<"authorization">>,
        <<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9iZV9pbnZpdGVkXzMwOTdAbG9jYWxob3N0Om1ha3JvbGlrYQ==">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Wed, 20 Dec 2023 12:48:37 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"2">>}],
         <<"[]">>,125,6150}
Params: #{path => <<"/api/contacts">>,
          server => #{node => mongooseim@localhost},
          method => <<"GET">>,role => client,
          creds =>
              {<<"bob_add_contact_and_be_invited_3097@localhost">>,
               <<"makrolika">>},
          body => <<>>,return_headers => true}


*** User 2023-12-20 12:48:37.720 ***🔗
REST request:
Code: 204
Req: {<0.85090.0>,<<"/api/contacts">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"52ad37313019e92b">>},
       {<<"authorization">>,
        <<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9iZV9pbnZpdGVkXzMwOTdAbG9jYWxob3N0Om1ha3JvbGlrYQ==">>}],
      <<"{\"jid\":\"alice_add_contact_and_be_invited_3097@localhost\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Wed, 20 Dec 2023 12:48:37 GMT">>}],
         <<>>,80,5327}
Params: #{path => <<"/api/contacts">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,role => client,
          creds =>
              {<<"bob_add_contact_and_be_invited_3097@localhost">>,
               <<"makrolika">>},
          body =>
              <<"{\"jid\":\"alice_add_contact_and_be_invited_3097@localhost\"}">>,
          return_headers => true}


*** User 2023-12-20 12:48:37.720 ***🔗
bob_add_contact_and_be_invited_3097@localhost/res1 in
<iq from='bob_add_contact_and_be_invited_3097@localhost' to='bob_add_contact_and_be_invited_3097@localhost/res1' id='push995f909e44d405b8' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='none' jid='alice_add_contact_and_be_invited_3097@localhost'/>
	</query>
</iq>



*** User 2023-12-20 12:48:37.730 ***🔗
REST request:
Code: 200
Req: {<0.85123.0>,<<"/api/contacts">>,<<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"77eb2e8fdb3d1ad7">>},
       {<<"authorization">>,
        <<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9iZV9pbnZpdGVkXzMwOTdAbG9jYWxob3N0Om1ha3JvbGlrYQ==">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Wed, 20 Dec 2023 12:48:37 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"94">>}],
         <<"[{\"ask\":\"none\",\"subscription\":\"none\",\"jid\":\"alice_add_contact_and_be_invited_3097@localhost\"}]">>,
         218,6026}
Params: #{path => <<"/api/contacts">>,
          server => #{node => mongooseim@localhost},
          method => <<"GET">>,role => client,
          creds =>
              {<<"bob_add_contact_and_be_invited_3097@localhost">>,
               <<"makrolika">>},
          body => <<>>,return_headers => true}


*** User 2023-12-20 12:48:37.730 ***🔗
alice_add_contact_and_be_invited_3097@localhost/res1 out
<iq type='set' id='cecd023480aaba0d693f91950488e459'>
	<query xmlns='jabber:iq:roster'>
		<item jid='bob_add_contact_and_be_invited_3097@localhost' name='Bobek'/>
	</query>
</iq>



*** User 2023-12-20 12:48:37.734 ***🔗
alice_add_contact_and_be_invited_3097@localhost/res1 in
<iq from='alice_add_contact_and_be_invited_3097@localhost' to='alice_add_contact_and_be_invited_3097@localhost/res1' id='push34813bea8951feb2' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='none' name='Bobek' jid='bob_add_contact_and_be_invited_3097@localhost'/>
	</query>
</iq>



*** User 2023-12-20 12:48:37.734 ***🔗
alice_add_contact_and_be_invited_3097@localhost/res1 in
<iq from='alice_add_contact_and_be_invited_3097@localhost' to='alice_add_contact_and_be_invited_3097@localhost/res1' id='cecd023480aaba0d693f91950488e459' type='result'/>



*** User 2023-12-20 12:48:37.734 ***🔗
alice_add_contact_and_be_invited_3097@localhost/res1 out
<presence type='subscribe' to='bob_add_contact_and_be_invited_3097@localhost'/>



*** User 2023-12-20 12:48:37.743 ***🔗
alice_add_contact_and_be_invited_3097@localhost/res1 in
<iq from='alice_add_contact_and_be_invited_3097@localhost' to='alice_add_contact_and_be_invited_3097@localhost/res1' id='push60e9cd781f8816eb' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item ask='subscribe' subscription='none' name='Bobek' jid='bob_add_contact_and_be_invited_3097@localhost'/>
	</query>
</iq>



*** User 2023-12-20 12:48:37.743 ***🔗
bob_add_contact_and_be_invited_3097@localhost/res1 in
<presence from='alice_add_contact_and_be_invited_3097@localhost' to='bob_add_contact_and_be_invited_3097@localhost/res1' type='subscribe'/>



*** User 2023-12-20 12:48:37.804 ***🔗
REST request:
Code: 200
Req: {<0.85190.0>,<<"/api/contacts">>,<<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"65de5f66f94dbb68">>},
       {<<"authorization">>,
        <<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9iZV9pbnZpdGVkXzMwOTdAbG9jYWxob3N0Om1ha3JvbGlrYQ==">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Wed, 20 Dec 2023 12:48:37 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"92">>}],
         <<"[{\"ask\":\"in\",\"subscription\":\"none\",\"jid\":\"alice_add_contact_and_be_invited_3097@localhost\"}]">>,
         216,56440}
Params: #{path => <<"/api/contacts">>,
          server => #{node => mongooseim@localhost},
          method => <<"GET">>,role => client,
          creds =>
              {<<"bob_add_contact_and_be_invited_3097@localhost">>,
               <<"makrolika">>},
          body => <<>>,return_headers => true}


*** User 2023-12-20 12:48:37.823 ***🔗
REST request:
Code: 204
Req: {<0.85214.0>,
      <<"/api/contacts/alice_add_contact_and_be_invited_3097@localhost">>,
      <<"PUT">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"a61b67554cc4d2c0">>},
       {<<"authorization">>,
        <<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9iZV9pbnZpdGVkXzMwOTdAbG9jYWxob3N0Om1ha3JvbGlrYQ==">>}],
      <<"{\"action\":\"accept\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Wed, 20 Dec 2023 12:48:37 GMT">>}],
         <<>>,80,11767}
Params: #{path =>
              <<"/api/contacts/alice_add_contact_and_be_invited_3097@localhost">>,
          server => #{node => mongooseim@localhost},
          method => <<"PUT">>,role => client,
          creds =>
              {<<"bob_add_contact_and_be_invited_3097@localhost">>,
               <<"makrolika">>},
          body => <<"{\"action\":\"accept\"}">>,return_headers => true}


*** User 2023-12-20 12:48:37.823 ***🔗
bob_add_contact_and_be_invited_3097@localhost/res1 in
<iq from='bob_add_contact_and_be_invited_3097@localhost' to='bob_add_contact_and_be_invited_3097@localhost/res1' id='push2e7ab77b77540afa' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='from' jid='alice_add_contact_and_be_invited_3097@localhost'/>
	</query>
</iq>



*** User 2023-12-20 12:48:37.823 ***🔗
alice_add_contact_and_be_invited_3097@localhost/res1 in
<presence from='bob_add_contact_and_be_invited_3097@localhost/res1' to='alice_add_contact_and_be_invited_3097@localhost/res1'/>



*** User 2023-12-20 12:48:37.823 ***🔗
alice_add_contact_and_be_invited_3097@localhost/res1 in
<iq from='alice_add_contact_and_be_invited_3097@localhost' to='alice_add_contact_and_be_invited_3097@localhost/res1' id='push7b20ca400697cfb9' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='to' name='Bobek' jid='bob_add_contact_and_be_invited_3097@localhost'/>
	</query>
</iq>



*** User 2023-12-20 12:48:37.823 ***🔗
alice_add_contact_and_be_invited_3097@localhost/res1 in
<presence from='bob_add_contact_and_be_invited_3097@localhost' to='alice_add_contact_and_be_invited_3097@localhost/res1' type='subscribed'/>



*** User 2023-12-20 12:48:37.824 ***🔗
bob_add_contact_and_be_invited_3097@localhost/res1 out
</stream:stream>

*** User 2023-12-20 12:48:37.824 ***🔗
bob_add_contact_and_be_invited_3097@localhost/res1 in
</stream:stream>

*** User 2023-12-20 12:48:37.824 ***🔗
alice_add_contact_and_be_invited_3097@localhost/res1 out
</stream:stream>

*** User 2023-12-20 12:48:37.824 ***🔗
alice_add_contact_and_be_invited_3097@localhost/res1 in
</stream:stream>
*** CT 2023-12-20 12:48:37.827 *** View log from node mongooseim@localhost when finished🔗 mongooseim@localhost_4766.html



=== Ended at 2023-12-20 12:48:37
=== successfully completed test case
=== === Returned value: ok