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

=== Config value:

    [{watchdog,<0.14172.1>},
     {muc_light_host,<<"muclight.localhost">>},
     {mam_backend,disabled},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/rest_client_SUITE_data"},
     {preset,"ldap_mnesia"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@d66972e2ee88.2022-01-27_15.24.27/big_tests.tests.rest_client_SUITE.logs/run.2022-01-27_15.33.55/rest_client_suite.add_contact_and_be_invited.73858.html"},
     {tc_group_properties,[{name,roster},{repeat_until_all_ok,3},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@d66972e2ee88.2022-01-27_15.24.27/big_tests.tests.rest_client_SUITE.logs/run.2022-01-27_15.33.55/log_private/"},
     {{saved_modules,mongooseim@localhost,<<"localhost">>},
      #{mod_adhoc => [],mod_amp => [],mod_bosh => [],
        mod_cache_users => [{number_of_segments,5},{time_to_live,2}],
        mod_carboncopy => [],mod_commands => [],
        mod_disco => [{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 => [],mod_sic => [],mod_stream_management => [],
        mod_vcard =>
            [{backend,ldap},
             {host,{prefix,<<"vjud.">>}},
             {ldap_base,"ou=Users,dc=esl,dc=com"},
             {ldap_filter,<<"(objectClass=inetOrgPerson)">>}]}}]

=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@d66972e2ee88.2022-01-27_15.24.27"

=== Started at 2022-01-27 15:33:57


*** CT 2022-01-27 15:33:57.444 *** View log from node mongooseim@localhost when started mongooseim@localhost_5013.html
*** CT 2022-01-27 15:33:57.445 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_2322.html

*** User 2022-01-27 15:33:57.473 ***
alicE_add_contact_and_be_invited_1136@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-01-27 15:33:57.474 ***
alicE_add_contact_and_be_invited_1136@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='f15c4f5831040e9b' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-27 15:33:57.474 ***
alicE_add_contact_and_be_invited_1136@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>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-01-27 15:33:57.474 ***
alicE_add_contact_and_be_invited_1136@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX2FkZF9jb250YWN0X2FuZF9iZV9pbnZpdGVkXzExMzYAbWF0eWdyeXNh</auth>



*** User 2022-01-27 15:33:57.475 ***
alicE_add_contact_and_be_invited_1136@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-01-27 15:33:57.475 ***
alicE_add_contact_and_be_invited_1136@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-01-27 15:33:57.475 ***
alicE_add_contact_and_be_invited_1136@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='e3ea369ae5f0dd36' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-27 15:33:57.476 ***
alicE_add_contact_and_be_invited_1136@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-01-27 15:33:57.476 ***
alicE_add_contact_and_be_invited_1136@localhost/res1 out
<iq type='set' id='1cf7d8f60c5ccad6d6b9a16aa347289f'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-01-27 15:33:57.476 ***
alicE_add_contact_and_be_invited_1136@localhost/res1 in
<iq id='1cf7d8f60c5ccad6d6b9a16aa347289f' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alicE_add_contact_and_be_invited_1136@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-01-27 15:33:57.476 ***
alicE_add_contact_and_be_invited_1136@localhost/res1 out
<iq type='set' id='144becdfaf96ca907044595eeaece224'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:33:57.476 ***
alicE_add_contact_and_be_invited_1136@localhost/res1 in
<iq type='result' id='144becdfaf96ca907044595eeaece224'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:33:57.476 ***
alicE_add_contact_and_be_invited_1136@localhost/res1 out
<presence/>



*** User 2022-01-27 15:33:57.477 ***
alicE_add_contact_and_be_invited_1136@localhost/res1 in
<presence from='alicE_add_contact_and_be_invited_1136@localhost/res1' to='alice_add_contact_and_be_invited_1136@localhost/res1' xml:lang='en'/>



*** User 2022-01-27 15:33:57.477 ***
bOb_add_contact_and_be_invited_1136@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-01-27 15:33:57.478 ***
bOb_add_contact_and_be_invited_1136@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='8a9e6b183ba4ba28' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-27 15:33:57.478 ***
bOb_add_contact_and_be_invited_1136@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>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-01-27 15:33:57.478 ***
bOb_add_contact_and_be_invited_1136@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9hZGRfY29udGFjdF9hbmRfYmVfaW52aXRlZF8xMTM2AG1ha3JvbGlrYQ==</auth>



*** User 2022-01-27 15:33:57.479 ***
bOb_add_contact_and_be_invited_1136@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-01-27 15:33:57.479 ***
bOb_add_contact_and_be_invited_1136@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-01-27 15:33:57.479 ***
bOb_add_contact_and_be_invited_1136@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='63b9675f5a1c3c30' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-27 15:33:57.479 ***
bOb_add_contact_and_be_invited_1136@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-01-27 15:33:57.480 ***
bOb_add_contact_and_be_invited_1136@localhost/res1 out
<iq type='set' id='152db1a56fad822b2a9d3da86eb8f236'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-01-27 15:33:57.480 ***
bOb_add_contact_and_be_invited_1136@localhost/res1 in
<iq id='152db1a56fad822b2a9d3da86eb8f236' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bOb_add_contact_and_be_invited_1136@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-01-27 15:33:57.480 ***
bOb_add_contact_and_be_invited_1136@localhost/res1 out
<iq type='set' id='12297328250f63617d4ef4ed31c25cc3'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:33:57.480 ***
bOb_add_contact_and_be_invited_1136@localhost/res1 in
<iq type='result' id='12297328250f63617d4ef4ed31c25cc3'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:33:57.480 ***
bOb_add_contact_and_be_invited_1136@localhost/res1 out
<presence/>



*** User 2022-01-27 15:33:57.481 ***
bOb_add_contact_and_be_invited_1136@localhost/res1 in
<presence from='bOb_add_contact_and_be_invited_1136@localhost/res1' to='bob_add_contact_and_be_invited_1136@localhost/res1' xml:lang='en'/>



*** User 2022-01-27 15:33:57.489 ***
REST request:
Code: 200
Req: {<0.14250.1>,<<"/api/contacts">>,<<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"5e5789ba5041fceb">>},
       {<<"authorization">>,
        <<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9iZV9pbnZpdGVkXzExMzZAbG9jYWxob3N0Om1ha3JvbGlrYQ==">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 15:33:56 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"2">>}],
         <<"[]">>,125,1343}
Params: #{body => <<>>,
          creds =>
              {<<"bob_add_contact_and_be_invited_1136@localhost">>,
               <<"makrolika">>},
          method => <<"GET">>,path => <<"/api/contacts">>,
          return_headers => true,role => client,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 15:33:57.498 ***
REST request:
Code: 204
Req: {<0.14272.1>,<<"/api/contacts">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"05020e685265f5a2">>},
       {<<"authorization">>,
        <<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9iZV9pbnZpdGVkXzExMzZAbG9jYWxob3N0Om1ha3JvbGlrYQ==">>}],
      <<"{\"jid\":\"alice_add_contact_and_be_invited_1136@localhost\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 15:33:56 GMT">>}],
         <<>>,80,1971}
Params: #{body =>
              <<"{\"jid\":\"alice_add_contact_and_be_invited_1136@localhost\"}">>,
          creds =>
              {<<"bob_add_contact_and_be_invited_1136@localhost">>,
               <<"makrolika">>},
          method => <<"POST">>,path => <<"/api/contacts">>,
          return_headers => true,role => client,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 15:33:57.499 ***
bOb_add_contact_and_be_invited_1136@localhost/res1 in
<iq from='bob_add_contact_and_be_invited_1136@localhost' to='bob_add_contact_and_be_invited_1136@localhost/res1' id='push3bff0dd7aa793701' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='none' jid='alice_add_contact_and_be_invited_1136@localhost'/>
	</query>
</iq>



*** User 2022-01-27 15:33:57.507 ***
REST request:
Code: 200
Req: {<0.14303.1>,<<"/api/contacts">>,<<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"ea2fd007948c29c9">>},
       {<<"authorization">>,
        <<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9iZV9pbnZpdGVkXzExMzZAbG9jYWxob3N0Om1ha3JvbGlrYQ==">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 15:33:56 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"94">>}],
         <<"[{\"subscription\":\"none\",\"jid\":\"alice_add_contact_and_be_invited_1136@localhost\",\"ask\":\"none\"}]">>,
         218,1293}
Params: #{body => <<>>,
          creds =>
              {<<"bob_add_contact_and_be_invited_1136@localhost">>,
               <<"makrolika">>},
          method => <<"GET">>,path => <<"/api/contacts">>,
          return_headers => true,role => client,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 15:33:57.507 ***
alicE_add_contact_and_be_invited_1136@localhost/res1 out
<iq type='set' id='dcd7c88b277a64d4e863b62e7d3245e9'>
	<query xmlns='jabber:iq:roster'>
		<item jid='bOb_add_contact_and_be_invited_1136@localhost' name='Bobek'/>
	</query>
</iq>



*** User 2022-01-27 15:33:57.508 ***
alicE_add_contact_and_be_invited_1136@localhost/res1 in
<iq from='alicE_add_contact_and_be_invited_1136@localhost' to='alicE_add_contact_and_be_invited_1136@localhost/res1' id='push741d646248c3a053' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='none' name='Bobek' jid='bob_add_contact_and_be_invited_1136@localhost'/>
	</query>
</iq>



*** User 2022-01-27 15:33:57.508 ***
alicE_add_contact_and_be_invited_1136@localhost/res1 in
<iq from='alicE_add_contact_and_be_invited_1136@localhost' to='alicE_add_contact_and_be_invited_1136@localhost/res1' id='dcd7c88b277a64d4e863b62e7d3245e9' type='result'/>



*** User 2022-01-27 15:33:57.508 ***
alicE_add_contact_and_be_invited_1136@localhost/res1 out
<presence type='subscribe' to='bOb_add_contact_and_be_invited_1136@localhost'/>



*** User 2022-01-27 15:33:57.510 ***
alicE_add_contact_and_be_invited_1136@localhost/res1 in
<iq from='alicE_add_contact_and_be_invited_1136@localhost' to='alicE_add_contact_and_be_invited_1136@localhost/res1' id='pushaab191d66999799c' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item ask='subscribe' subscription='none' name='Bobek' jid='bob_add_contact_and_be_invited_1136@localhost'/>
	</query>
</iq>



*** User 2022-01-27 15:33:57.510 ***
bOb_add_contact_and_be_invited_1136@localhost/res1 in
<presence from='alicE_add_contact_and_be_invited_1136@localhost' to='bOb_add_contact_and_be_invited_1136@localhost/res1' xml:lang='en' type='subscribe'/>



*** User 2022-01-27 15:33:57.570 ***
REST request:
Code: 200
Req: {<0.14349.1>,<<"/api/contacts">>,<<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"87dbf0c1182b6259">>},
       {<<"authorization">>,
        <<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9iZV9pbnZpdGVkXzExMzZAbG9jYWxob3N0Om1ha3JvbGlrYQ==">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 15:33:56 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"92">>}],
         <<"[{\"subscription\":\"none\",\"jid\":\"alice_add_contact_and_be_invited_1136@localhost\",\"ask\":\"in\"}]">>,
         216,49639}
Params: #{body => <<>>,
          creds =>
              {<<"bob_add_contact_and_be_invited_1136@localhost">>,
               <<"makrolika">>},
          method => <<"GET">>,path => <<"/api/contacts">>,
          return_headers => true,role => client,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 15:33:57.579 ***
REST request:
Code: 204
Req: {<0.14386.1>,
      <<"/api/contacts/alice_add_contact_and_be_invited_1136@localhost">>,
      <<"PUT">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"91e7c57310e3e3ec">>},
       {<<"authorization">>,
        <<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9iZV9pbnZpdGVkXzExMzZAbG9jYWxob3N0Om1ha3JvbGlrYQ==">>}],
      <<"{\"action\":\"accept\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 15:33:57 GMT">>}],
         <<>>,80,2282}
Params: #{body => <<"{\"action\":\"accept\"}">>,
          creds =>
              {<<"bob_add_contact_and_be_invited_1136@localhost">>,
               <<"makrolika">>},
          method => <<"PUT">>,
          path =>
              <<"/api/contacts/alice_add_contact_and_be_invited_1136@localhost">>,
          return_headers => true,role => client,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 15:33:57.579 ***
bOb_add_contact_and_be_invited_1136@localhost/res1 in
<iq from='bob_add_contact_and_be_invited_1136@localhost' to='bob_add_contact_and_be_invited_1136@localhost/res1' id='push985f2402fe0a50f8' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='from' jid='alice_add_contact_and_be_invited_1136@localhost'/>
	</query>
</iq>



*** User 2022-01-27 15:33:57.579 ***
alicE_add_contact_and_be_invited_1136@localhost/res1 in
<presence from='bOb_add_contact_and_be_invited_1136@localhost/res1' to='alice_add_contact_and_be_invited_1136@localhost/res1' xml:lang='en'/>



*** User 2022-01-27 15:33:57.579 ***
alicE_add_contact_and_be_invited_1136@localhost/res1 in
<iq from='alice_add_contact_and_be_invited_1136@localhost' to='alice_add_contact_and_be_invited_1136@localhost/res1' id='pushbe5aeb98dff7e48e' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='to' name='Bobek' jid='bob_add_contact_and_be_invited_1136@localhost'/>
	</query>
</iq>



*** User 2022-01-27 15:33:57.580 ***
alicE_add_contact_and_be_invited_1136@localhost/res1 in
<presence from='bob_add_contact_and_be_invited_1136@localhost' to='alice_add_contact_and_be_invited_1136@localhost/res1' type='subscribed'/>



*** User 2022-01-27 15:33:57.580 ***
bOb_add_contact_and_be_invited_1136@localhost/res1 out
</stream:stream>

*** User 2022-01-27 15:33:57.580 ***
bOb_add_contact_and_be_invited_1136@localhost/res1 in
</stream:stream>

*** User 2022-01-27 15:33:57.580 ***
alicE_add_contact_and_be_invited_1136@localhost/res1 out
</stream:stream>

*** User 2022-01-27 15:33:57.580 ***
alicE_add_contact_and_be_invited_1136@localhost/res1 in
</stream:stream>
*** CT 2022-01-27 15:33:57.582 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_2322.html
*** CT 2022-01-27 15:33:57.582 *** View log from node mongooseim@localhost when finished mongooseim@localhost_5013.html



=== Ended at 2022-01-27 15:33:57
=== successfully completed test case
=== === Returned value: ok