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

=== Config value:

    [{watchdog,<0.14396.2>},
     {muc_light_host,<<"muclight.localhost">>},
     {mam_backend,rdbms},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/rest_client_SUITE_data"},
     {preset,"odbc_mssql_mnesia"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@cb94372a8ea7.2022-04-04_15.02.36/big_tests.tests.rest_client_SUITE.logs/run.2022-04-04_15.15.12/rest_client_suite.add_contact_and_be_invited.179714.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@cb94372a8ea7.2022-04-04_15.02.36/big_tests.tests.rest_client_SUITE.logs/run.2022-04-04_15.15.12/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 => rdbms,iqdisc => one_queue,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 => rdbms,
              host => {prefix,<<"vjud.">>},
              iqdisc => parallel,matches => 30,search => true}}}]

=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@cb94372a8ea7.2022-04-04_15.02.36"

=== Started at 2022-04-04 15:15:16


*** CT 2022-04-04 15:15:16.111 *** View log from node mongooseim@localhost when started mongooseim@localhost_5109.html
*** CT 2022-04-04 15:15:16.112 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_1974.html

*** User 2022-04-04 15:15:16.127 ***
alicE_add_contact_and_be_invited_2374@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-04 15:15:16.128 ***
alicE_add_contact_and_be_invited_2374@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='3b09dcf55afe2350' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-04-04 15:15:16.128 ***
alicE_add_contact_and_be_invited_2374@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-04 15:15:16.128 ***
alicE_add_contact_and_be_invited_2374@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX2FkZF9jb250YWN0X2FuZF9iZV9pbnZpdGVkXzIzNzQAbWF0eWdyeXNh</auth>



*** User 2022-04-04 15:15:16.129 ***
alicE_add_contact_and_be_invited_2374@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-04-04 15:15:16.129 ***
alicE_add_contact_and_be_invited_2374@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-04 15:15:16.130 ***
alicE_add_contact_and_be_invited_2374@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='7b090a9d54ba0e37' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-04-04 15:15:16.130 ***
alicE_add_contact_and_be_invited_2374@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-04 15:15:16.130 ***
alicE_add_contact_and_be_invited_2374@localhost/res1 out
<iq type='set' id='696344af7623ba2cc33bced4b532ed50'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-04-04 15:15:16.130 ***
alicE_add_contact_and_be_invited_2374@localhost/res1 in
<iq id='696344af7623ba2cc33bced4b532ed50' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alicE_add_contact_and_be_invited_2374@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-04-04 15:15:16.130 ***
alicE_add_contact_and_be_invited_2374@localhost/res1 out
<iq type='set' id='460edcbe5cb457e3c487aa522c9a8167'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-04-04 15:15:16.130 ***
alicE_add_contact_and_be_invited_2374@localhost/res1 in
<iq type='result' id='460edcbe5cb457e3c487aa522c9a8167'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-04-04 15:15:16.130 ***
alicE_add_contact_and_be_invited_2374@localhost/res1 out
<presence/>



*** User 2022-04-04 15:15:16.133 ***
alicE_add_contact_and_be_invited_2374@localhost/res1 in
<presence from='alicE_add_contact_and_be_invited_2374@localhost/res1' to='alice_add_contact_and_be_invited_2374@localhost/res1' xml:lang='en'/>



*** User 2022-04-04 15:15:16.133 ***
bOb_add_contact_and_be_invited_2374@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-04 15:15:16.134 ***
bOb_add_contact_and_be_invited_2374@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='ae2d0d78f5467a7b' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-04-04 15:15:16.134 ***
bOb_add_contact_and_be_invited_2374@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-04 15:15:16.134 ***
bOb_add_contact_and_be_invited_2374@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9hZGRfY29udGFjdF9hbmRfYmVfaW52aXRlZF8yMzc0AG1ha3JvbGlrYQ==</auth>



*** User 2022-04-04 15:15:16.135 ***
bOb_add_contact_and_be_invited_2374@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-04-04 15:15:16.135 ***
bOb_add_contact_and_be_invited_2374@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-04 15:15:16.135 ***
bOb_add_contact_and_be_invited_2374@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='20fd79505ac0488e' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-04-04 15:15:16.136 ***
bOb_add_contact_and_be_invited_2374@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-04 15:15:16.136 ***
bOb_add_contact_and_be_invited_2374@localhost/res1 out
<iq type='set' id='c6f4a0f9e8eaa68f25dde4089862082d'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-04-04 15:15:16.136 ***
bOb_add_contact_and_be_invited_2374@localhost/res1 in
<iq id='c6f4a0f9e8eaa68f25dde4089862082d' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bOb_add_contact_and_be_invited_2374@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-04-04 15:15:16.136 ***
bOb_add_contact_and_be_invited_2374@localhost/res1 out
<iq type='set' id='d9e7b8015965f6b9e52a9c8d2eca028f'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-04-04 15:15:16.136 ***
bOb_add_contact_and_be_invited_2374@localhost/res1 in
<iq type='result' id='d9e7b8015965f6b9e52a9c8d2eca028f'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-04-04 15:15:16.136 ***
bOb_add_contact_and_be_invited_2374@localhost/res1 out
<presence/>



*** User 2022-04-04 15:15:16.139 ***
bOb_add_contact_and_be_invited_2374@localhost/res1 in
<presence from='bOb_add_contact_and_be_invited_2374@localhost/res1' to='bob_add_contact_and_be_invited_2374@localhost/res1' xml:lang='en'/>



*** User 2022-04-04 15:15:16.149 ***
REST request:
Code: 200
Req: {<0.14477.2>,<<"/api/contacts">>,<<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"d12d3b3d28a1043f">>},
       {<<"authorization">>,
        <<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9iZV9pbnZpdGVkXzIzNzRAbG9jYWxob3N0Om1ha3JvbGlrYQ==">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 04 Apr 2022 15:15:15 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"2">>}],
         <<"[]">>,125,2561}
Params: #{body => <<>>,
          creds =>
              {<<"bob_add_contact_and_be_invited_2374@localhost">>,
               <<"makrolika">>},
          method => <<"GET">>,path => <<"/api/contacts">>,
          return_headers => true,role => client,
          server => #{node => mongooseim@localhost}}


*** User 2022-04-04 15:15:16.169 ***
REST request:
Code: 204
Req: {<0.14493.2>,<<"/api/contacts">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"6046a306e3d5799a">>},
       {<<"authorization">>,
        <<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9iZV9pbnZpdGVkXzIzNzRAbG9jYWxob3N0Om1ha3JvbGlrYQ==">>}],
      <<"{\"jid\":\"alice_add_contact_and_be_invited_2374@localhost\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 04 Apr 2022 15:15:15 GMT">>}],
         <<>>,80,9673}
Params: #{body =>
              <<"{\"jid\":\"alice_add_contact_and_be_invited_2374@localhost\"}">>,
          creds =>
              {<<"bob_add_contact_and_be_invited_2374@localhost">>,
               <<"makrolika">>},
          method => <<"POST">>,path => <<"/api/contacts">>,
          return_headers => true,role => client,
          server => #{node => mongooseim@localhost}}


*** User 2022-04-04 15:15:16.169 ***
bOb_add_contact_and_be_invited_2374@localhost/res1 in
<iq from='bob_add_contact_and_be_invited_2374@localhost' to='bob_add_contact_and_be_invited_2374@localhost/res1' id='push8e35f1adb42c7224' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='none' jid='alice_add_contact_and_be_invited_2374@localhost'/>
	</query>
</iq>



*** User 2022-04-04 15:15:16.184 ***
REST request:
Code: 200
Req: {<0.14526.2>,<<"/api/contacts">>,<<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"739c24e61256fae8">>},
       {<<"authorization">>,
        <<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9iZV9pbnZpdGVkXzIzNzRAbG9jYWxob3N0Om1ha3JvbGlrYQ==">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 04 Apr 2022 15:15:15 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"94">>}],
         <<"[{\"subscription\":\"none\",\"jid\":\"alice_add_contact_and_be_invited_2374@localhost\",\"ask\":\"none\"}]">>,
         218,4391}
Params: #{body => <<>>,
          creds =>
              {<<"bob_add_contact_and_be_invited_2374@localhost">>,
               <<"makrolika">>},
          method => <<"GET">>,path => <<"/api/contacts">>,
          return_headers => true,role => client,
          server => #{node => mongooseim@localhost}}


*** User 2022-04-04 15:15:16.184 ***
alicE_add_contact_and_be_invited_2374@localhost/res1 out
<iq type='set' id='70ede8156954b89569ce2da28390968e'>
	<query xmlns='jabber:iq:roster'>
		<item jid='bOb_add_contact_and_be_invited_2374@localhost' name='Bobek'/>
	</query>
</iq>



*** User 2022-04-04 15:15:16.235 ***
alicE_add_contact_and_be_invited_2374@localhost/res1 in
<iq from='alicE_add_contact_and_be_invited_2374@localhost' to='alicE_add_contact_and_be_invited_2374@localhost/res1' id='push383a8d1354685739' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='none' name='Bobek' jid='bob_add_contact_and_be_invited_2374@localhost'/>
	</query>
</iq>



*** User 2022-04-04 15:15:16.235 ***
alicE_add_contact_and_be_invited_2374@localhost/res1 in
<iq from='alicE_add_contact_and_be_invited_2374@localhost' to='alicE_add_contact_and_be_invited_2374@localhost/res1' id='70ede8156954b89569ce2da28390968e' type='result'/>



*** User 2022-04-04 15:15:16.235 ***
alicE_add_contact_and_be_invited_2374@localhost/res1 out
<presence type='subscribe' to='bOb_add_contact_and_be_invited_2374@localhost'/>



*** User 2022-04-04 15:15:16.244 ***
alicE_add_contact_and_be_invited_2374@localhost/res1 in
<iq from='alicE_add_contact_and_be_invited_2374@localhost' to='alicE_add_contact_and_be_invited_2374@localhost/res1' id='push7f389fa2f3f5891b' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item ask='subscribe' subscription='none' name='Bobek' jid='bob_add_contact_and_be_invited_2374@localhost'/>
	</query>
</iq>



*** User 2022-04-04 15:15:16.244 ***
bOb_add_contact_and_be_invited_2374@localhost/res1 in
<presence from='alicE_add_contact_and_be_invited_2374@localhost' to='bOb_add_contact_and_be_invited_2374@localhost/res1' xml:lang='en' type='subscribe'/>



*** User 2022-04-04 15:15:16.256 ***
REST request:
Code: 200
Req: {<0.14565.2>,<<"/api/contacts">>,<<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"4211bbef567ae401">>},
       {<<"authorization">>,
        <<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9iZV9pbnZpdGVkXzIzNzRAbG9jYWxob3N0Om1ha3JvbGlrYQ==">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 04 Apr 2022 15:15:15 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"92">>}],
         <<"[{\"subscription\":\"none\",\"jid\":\"alice_add_contact_and_be_invited_2374@localhost\",\"ask\":\"in\"}]">>,
         216,3139}
Params: #{body => <<>>,
          creds =>
              {<<"bob_add_contact_and_be_invited_2374@localhost">>,
               <<"makrolika">>},
          method => <<"GET">>,path => <<"/api/contacts">>,
          return_headers => true,role => client,
          server => #{node => mongooseim@localhost}}


*** User 2022-04-04 15:15:16.279 ***
REST request:
Code: 204
Req: {<0.14595.2>,
      <<"/api/contacts/alice_add_contact_and_be_invited_2374@localhost">>,
      <<"PUT">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"0644949190c8bd35">>},
       {<<"authorization">>,
        <<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9iZV9pbnZpdGVkXzIzNzRAbG9jYWxob3N0Om1ha3JvbGlrYQ==">>}],
      <<"{\"action\":\"accept\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 04 Apr 2022 15:15:16 GMT">>}],
         <<>>,80,13924}
Params: #{body => <<"{\"action\":\"accept\"}">>,
          creds =>
              {<<"bob_add_contact_and_be_invited_2374@localhost">>,
               <<"makrolika">>},
          method => <<"PUT">>,
          path =>
              <<"/api/contacts/alice_add_contact_and_be_invited_2374@localhost">>,
          return_headers => true,role => client,
          server => #{node => mongooseim@localhost}}


*** User 2022-04-04 15:15:16.279 ***
bOb_add_contact_and_be_invited_2374@localhost/res1 in
<iq from='bob_add_contact_and_be_invited_2374@localhost' to='bob_add_contact_and_be_invited_2374@localhost/res1' id='pushe4108e47ae7da2af' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='from' jid='alice_add_contact_and_be_invited_2374@localhost'/>
	</query>
</iq>



*** User 2022-04-04 15:15:16.279 ***
alicE_add_contact_and_be_invited_2374@localhost/res1 in
<presence from='bOb_add_contact_and_be_invited_2374@localhost/res1' to='alice_add_contact_and_be_invited_2374@localhost/res1' xml:lang='en'/>



*** User 2022-04-04 15:15:16.279 ***
alicE_add_contact_and_be_invited_2374@localhost/res1 in
<iq from='alice_add_contact_and_be_invited_2374@localhost' to='alice_add_contact_and_be_invited_2374@localhost/res1' id='pushe61575616d108b4a' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='to' name='Bobek' jid='bob_add_contact_and_be_invited_2374@localhost'/>
	</query>
</iq>



*** User 2022-04-04 15:15:16.279 ***
alicE_add_contact_and_be_invited_2374@localhost/res1 in
<presence from='bob_add_contact_and_be_invited_2374@localhost' to='alice_add_contact_and_be_invited_2374@localhost/res1' type='subscribed'/>



*** User 2022-04-04 15:15:16.279 ***
bOb_add_contact_and_be_invited_2374@localhost/res1 out
</stream:stream>

*** User 2022-04-04 15:15:16.280 ***
bOb_add_contact_and_be_invited_2374@localhost/res1 in
</stream:stream>

*** User 2022-04-04 15:15:16.280 ***
alicE_add_contact_and_be_invited_2374@localhost/res1 out
</stream:stream>

*** User 2022-04-04 15:15:16.280 ***
alicE_add_contact_and_be_invited_2374@localhost/res1 in
</stream:stream>
*** CT 2022-04-04 15:15:16.282 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_1974.html
*** CT 2022-04-04 15:15:16.283 *** View log from node mongooseim@localhost when finished mongooseim@localhost_5109.html



=== Ended at 2022-04-04 15:15:16
=== successfully completed test case
=== === Returned value: ok