=== Test case: rest_SUITE:befriend_and_alienate/1 (click for source code)

=== Config value:

    [{watchdog,<0.28331.1>},
     {{ejabberd_cwd,mongooseim@localhost},
      "/home/circleci/project/_build/mim1/rel/mongooseim"},
     {mam_backend,rdbms},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/rest_SUITE_data"},
     {preset,"pgsql_mnesia"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@333794cb5a72.2022-03-07_15.57.24/big_tests.tests.rest_SUITE.logs/run.2022-03-07_16.05.12/rest_suite.befriend_and_alienate.98563.html"},
     {tc_group_properties,[{name,roster},parallel]},
     {tc_group_path,[]},
     {data_dir,"/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/rest_SUITE_data/"},
     {priv_dir,"/home/circleci/project/big_tests/ct_report/ct_run.test@333794cb5a72.2022-03-07_15.57.24/big_tests.tests.rest_SUITE.logs/run.2022-03-07_16.05.12/log_private/"},
     {{saved_modules,mongooseim@localhost,<<"test type">>},
      #{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},{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 => [],
        mod_vcard =>
            #{backend => rdbms,
              host => {prefix,<<"vjud.">>},
              iqdisc => parallel,ldap_binary_search_fields => [],
              ldap_pool_tag => default,
              ldap_search_fields =>
                  [{<<"User">>,<<"%u">>},
                   {<<"Full Name">>,<<"displayName">>},
                   {<<"Given Name">>,<<"givenName">>},
                   {<<"Middle Name">>,<<"initials">>},
                   {<<"Family Name">>,<<"sn">>},
                   {<<"Nickname">>,<<"%u">>},
                   {<<"Birthday">>,<<"birthDay">>},
                   {<<"Country">>,<<"c">>},
                   {<<"City">>,<<"l">>},
                   {<<"Email">>,<<"mail">>},
                   {<<"Organization Name">>,<<"o">>},
                   {<<"Organization Unit">>,<<"ou">>}],
              ldap_search_operator => 'and',
              ldap_search_reported =>
                  [{<<"Full Name">>,<<"FN">>},
                   {<<"Given Name">>,<<"FIRST">>},
                   {<<"Middle Name">>,<<"MIDDLE">>},
                   {<<"Family Name">>,<<"LAST">>},
                   {<<"Nickname">>,<<"NICK">>},
                   {<<"Birthday">>,<<"BDAY">>},
                   {<<"Country">>,<<"CTRY">>},
                   {<<"City">>,<<"LOCALITY">>},
                   {<<"Email">>,<<"EMAIL">>},
                   {<<"Organization Name">>,<<"ORGNAME">>},
                   {<<"Organization Unit">>,<<"ORGUNIT">>}],
              ldap_uids => [{<<"uid">>,<<"%u">>}],
              ldap_vcard_map =>
                  [{<<"NICKNAME">>,<<"%u">>,[]},
                   {<<"FN">>,<<"%s">>,[<<"displayName">>]},
                   {<<"FAMILY">>,<<"%s">>,[<<"sn">>]},
                   {<<"GIVEN">>,<<"%s">>,[<<"givenName">>]},
                   {<<"MIDDLE">>,<<"%s">>,[<<"initials">>]},
                   {<<"ORGNAME">>,<<"%s">>,[<<"o">>]},
                   {<<"ORGUNIT">>,<<"%s">>,[<<"ou">>]},
                   {<<"CTRY">>,<<"%s">>,[<<"c">>]},
                   {<<"LOCALITY">>,<<"%s">>,[<<"l">>]},
                   {<<"STREET">>,<<"%s">>,[<<"street">>]},
                   {<<"REGION">>,<<"%s">>,[<<"st">>]},
                   {<<"PCODE">>,<<"%s">>,[<<"postalCode">>]},
                   {<<"TITLE">>,<<"%s">>,[<<"title">>]},
                   {<<"URL">>,<<"%s">>,[<<"labeleduri">>]},
                   {<<"DESC">>,<<"%s">>,[<<"description">>]},
                   {<<"TEL">>,<<"%s">>,[<<"telephoneNumber">>]},
                   {<<"EMAIL">>,<<"%s">>,[<<"mail">>]},
                   {<<"BDAY">>,<<"%s">>,[<<"birthDay">>]},
                   {<<"ROLE">>,<<"%s">>,[<<"employeeType">>]},
                   {<<"PHOTO">>,<<"%s">>,[<<"jpegPhoto">>]}],
              matches => 30,search => true}}},
     {escalus_users,[{alice,[{username,<<"alicE">>},
                             {server,<<"domain.example.com">>},
                             {host,<<"localhost">>},
                             {password,<<"matygrysa">>}]},
                     {bob,[{username,<<"bOb">>},
                           {server,<<"domain.example.com">>},
                           {host,<<"localhost">>},
                           {password,<<"makrolika">>}]}]}]

=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@333794cb5a72.2022-03-07_15.57.24"

=== Started at 2022-03-07 16:05:13


*** CT 2022-03-07 16:05:13.630 *** View log from node mongooseim@localhost when started mongooseim@localhost_1553.html
*** CT 2022-03-07 16:05:13.631 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_533.html

*** User 2022-03-07 16:05:13.641 ***
alicE_befriend_and_alienate_1746@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-03-07 16:05:13.642 ***
alicE_befriend_and_alienate_1746@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='ceb9dbf869112572' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-03-07 16:05:13.642 ***
alicE_befriend_and_alienate_1746@domain.example.com/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-03-07 16:05:13.642 ***
alicE_befriend_and_alienate_1746@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX2JlZnJpZW5kX2FuZF9hbGllbmF0ZV8xNzQ2AG1hdHlncnlzYQ==</auth>



*** User 2022-03-07 16:05:13.643 ***
alicE_befriend_and_alienate_1746@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-03-07 16:05:13.643 ***
alicE_befriend_and_alienate_1746@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-03-07 16:05:13.643 ***
alicE_befriend_and_alienate_1746@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='c838b58e2598c195' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-03-07 16:05:13.644 ***
alicE_befriend_and_alienate_1746@domain.example.com/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-03-07 16:05:13.644 ***
alicE_befriend_and_alienate_1746@domain.example.com/res1 out
<iq type='set' id='ade3b35eddcf853d0ee394468c9804e6'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-03-07 16:05:13.644 ***
alicE_befriend_and_alienate_1746@domain.example.com/res1 in
<iq id='ade3b35eddcf853d0ee394468c9804e6' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alicE_befriend_and_alienate_1746@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2022-03-07 16:05:13.644 ***
alicE_befriend_and_alienate_1746@domain.example.com/res1 out
<iq type='set' id='f5c402d0d4bd12996394878fd18fb2ba'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-07 16:05:13.644 ***
alicE_befriend_and_alienate_1746@domain.example.com/res1 in
<iq type='result' id='f5c402d0d4bd12996394878fd18fb2ba'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-07 16:05:13.644 ***
alicE_befriend_and_alienate_1746@domain.example.com/res1 out
<presence/>



*** User 2022-03-07 16:05:13.646 ***
alicE_befriend_and_alienate_1746@domain.example.com/res1 in
<presence from='alicE_befriend_and_alienate_1746@domain.example.com/res1' to='alice_befriend_and_alienate_1746@domain.example.com/res1' xml:lang='en'/>



*** User 2022-03-07 16:05:13.647 ***
bOb_befriend_and_alienate_1746@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-03-07 16:05:13.647 ***
bOb_befriend_and_alienate_1746@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='4de417fa2412f2e8' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-03-07 16:05:13.647 ***
bOb_befriend_and_alienate_1746@domain.example.com/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-03-07 16:05:13.647 ***
bOb_befriend_and_alienate_1746@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9iZWZyaWVuZF9hbmRfYWxpZW5hdGVfMTc0NgBtYWtyb2xpa2E=</auth>



*** User 2022-03-07 16:05:13.648 ***
bOb_befriend_and_alienate_1746@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-03-07 16:05:13.648 ***
bOb_befriend_and_alienate_1746@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-03-07 16:05:13.648 ***
bOb_befriend_and_alienate_1746@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='9e3f1298cd1f65a8' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-03-07 16:05:13.648 ***
bOb_befriend_and_alienate_1746@domain.example.com/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-03-07 16:05:13.649 ***
bOb_befriend_and_alienate_1746@domain.example.com/res1 out
<iq type='set' id='3a83756a69118f592786e51f634e5982'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-03-07 16:05:13.649 ***
bOb_befriend_and_alienate_1746@domain.example.com/res1 in
<iq id='3a83756a69118f592786e51f634e5982' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bOb_befriend_and_alienate_1746@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2022-03-07 16:05:13.649 ***
bOb_befriend_and_alienate_1746@domain.example.com/res1 out
<iq type='set' id='2f421fd9d2ae6da4ce645f143b98abd1'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-07 16:05:13.649 ***
bOb_befriend_and_alienate_1746@domain.example.com/res1 in
<iq type='result' id='2f421fd9d2ae6da4ce645f143b98abd1'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-07 16:05:13.649 ***
bOb_befriend_and_alienate_1746@domain.example.com/res1 out
<presence/>



*** User 2022-03-07 16:05:13.651 ***
bOb_befriend_and_alienate_1746@domain.example.com/res1 in
<presence from='bOb_befriend_and_alienate_1746@domain.example.com/res1' to='bob_befriend_and_alienate_1746@domain.example.com/res1' xml:lang='en'/>



*** User 2022-03-07 16:05:13.654 ***
REST request:
Code: 200
Req: {<0.28390.1>,
      <<"/api/contacts/alice_befriend_and_alienate_1746@domain.example.com">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"2b58c701835f80d3">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 07 Mar 2022 16:05:13 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"2">>}],
         <<"[]">>,125,2513}
Params: #{body => <<>>,method => <<"GET">>,
          path =>
              <<"/api/contacts/alice_befriend_and_alienate_1746@domain.example.com">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-07 16:05:13.657 ***
REST request:
Code: 200
Req: {<0.28398.1>,
      <<"/api/contacts/bob_befriend_and_alienate_1746@domain.example.com">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"db412f78e519f206">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 07 Mar 2022 16:05:13 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"2">>}],
         <<"[]">>,125,1662}
Params: #{body => <<>>,method => <<"GET">>,
          path =>
              <<"/api/contacts/bob_befriend_and_alienate_1746@domain.example.com">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-07 16:05:13.664 ***
REST request:
Code: 204
Req: {<0.28406.1>,
      <<"/api/contacts/alice_befriend_and_alienate_1746@domain.example.com">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"50a22f021bc85d7a">>}],
      <<"{\"jid\":\"bob_befriend_and_alienate_1746@domain.example.com\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 07 Mar 2022 16:05:13 GMT">>},
          {<<"content-type">>,<<"application/json">>}],
         <<>>,112,4870}
Params: #{body =>
              <<"{\"jid\":\"bob_befriend_and_alienate_1746@domain.example.com\"}">>,
          method => <<"POST">>,
          path =>
              <<"/api/contacts/alice_befriend_and_alienate_1746@domain.example.com">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-07 16:05:13.667 ***
REST request:
Code: 204
Req: {<0.28418.1>,
      <<"/api/contacts/bob_befriend_and_alienate_1746@domain.example.com">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"96805b7c1ce87d1c">>}],
      <<"{\"jid\":\"alice_befriend_and_alienate_1746@domain.example.com\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 07 Mar 2022 16:05:13 GMT">>},
          {<<"content-type">>,<<"application/json">>}],
         <<>>,112,1983}
Params: #{body =>
              <<"{\"jid\":\"alice_befriend_and_alienate_1746@domain.example.com\"}">>,
          method => <<"POST">>,
          path =>
              <<"/api/contacts/bob_befriend_and_alienate_1746@domain.example.com">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-07 16:05:13.670 ***
REST request:
Code: 200
Req: {<0.28424.1>,
      <<"/api/contacts/bob_befriend_and_alienate_1746@domain.example.com">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"d18c99f736c20da4">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 07 Mar 2022 16:05:13 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"98">>}],
         <<"[{\"subscription\":\"none\",\"jid\":\"alice_befriend_and_alienate_1746@domain.example.com\",\"ask\":\"none\"}]">>,
         222,1588}
Params: #{body => <<>>,method => <<"GET">>,
          path =>
              <<"/api/contacts/bob_befriend_and_alienate_1746@domain.example.com">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-07 16:05:13.674 ***
REST request:
Code: 200
Req: {<0.28428.1>,
      <<"/api/contacts/alice_befriend_and_alienate_1746@domain.example.com">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"073a4be1e63c012a">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 07 Mar 2022 16:05:13 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"96">>}],
         <<"[{\"subscription\":\"none\",\"jid\":\"bob_befriend_and_alienate_1746@domain.example.com\",\"ask\":\"none\"}]">>,
         220,2754}
Params: #{body => <<>>,method => <<"GET">>,
          path =>
              <<"/api/contacts/alice_befriend_and_alienate_1746@domain.example.com">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-07 16:05:13.679 ***
REST request:
Code: 204
Req: {<0.28434.1>,
      <<"/api/contacts/alice_befriend_and_alienate_1746@domain.example.com/bob_befriend_and_alienate_1746@domain.example.com">>,
      <<"PUT">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"e0919cc86df87fb3">>}],
      <<"{\"action\":\"subscribe\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 07 Mar 2022 16:05:13 GMT">>},
          {<<"content-type">>,<<"application/json">>}],
         <<>>,112,4141}
Params: #{body => <<"{\"action\":\"subscribe\"}">>,method => <<"PUT">>,
          path =>
              <<"/api/contacts/alice_befriend_and_alienate_1746@domain.example.com/bob_befriend_and_alienate_1746@domain.example.com">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-07 16:05:13.682 ***
REST request:
Code: 200
Req: {<0.28440.1>,
      <<"/api/contacts/alice_befriend_and_alienate_1746@domain.example.com">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"ff9a7c9c1ebd96ac">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 07 Mar 2022 16:05:13 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"95">>}],
         <<"[{\"subscription\":\"none\",\"jid\":\"bob_befriend_and_alienate_1746@domain.example.com\",\"ask\":\"out\"}]">>,
         219,1125}
Params: #{body => <<>>,method => <<"GET">>,
          path =>
              <<"/api/contacts/alice_befriend_and_alienate_1746@domain.example.com">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-07 16:05:13.687 ***
REST request:
Code: 204
Req: {<0.28449.1>,
      <<"/api/contacts/bob_befriend_and_alienate_1746@domain.example.com/alice_befriend_and_alienate_1746@domain.example.com">>,
      <<"PUT">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"cc5711d6d568d477">>}],
      <<"{\"action\":\"subscribed\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 07 Mar 2022 16:05:13 GMT">>},
          {<<"content-type">>,<<"application/json">>}],
         <<>>,112,4292}
Params: #{body => <<"{\"action\":\"subscribed\"}">>,method => <<"PUT">>,
          path =>
              <<"/api/contacts/bob_befriend_and_alienate_1746@domain.example.com/alice_befriend_and_alienate_1746@domain.example.com">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-07 16:05:13.689 ***
REST request:
Code: 200
Req: {<0.28454.1>,
      <<"/api/contacts/alice_befriend_and_alienate_1746@domain.example.com">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"6987590c8681f077">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 07 Mar 2022 16:05:13 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"94">>}],
         <<"[{\"subscription\":\"to\",\"jid\":\"bob_befriend_and_alienate_1746@domain.example.com\",\"ask\":\"none\"}]">>,
         218,1449}
Params: #{body => <<>>,method => <<"GET">>,
          path =>
              <<"/api/contacts/alice_befriend_and_alienate_1746@domain.example.com">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-07 16:05:13.692 ***
REST request:
Code: 200
Req: {<0.28456.1>,
      <<"/api/contacts/bob_befriend_and_alienate_1746@domain.example.com">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"f1046bc953ffece9">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 07 Mar 2022 16:05:13 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"98">>}],
         <<"[{\"subscription\":\"from\",\"jid\":\"alice_befriend_and_alienate_1746@domain.example.com\",\"ask\":\"none\"}]">>,
         222,1085}
Params: #{body => <<>>,method => <<"GET">>,
          path =>
              <<"/api/contacts/bob_befriend_and_alienate_1746@domain.example.com">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-07 16:05:13.696 ***
REST request:
Code: 204
Req: {<0.28458.1>,
      <<"/api/contacts/bob_befriend_and_alienate_1746@domain.example.com/alice_befriend_and_alienate_1746@domain.example.com">>,
      <<"PUT">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"8bf995ac64621fea">>}],
      <<"{\"action\":\"subscribe\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 07 Mar 2022 16:05:13 GMT">>},
          {<<"content-type">>,<<"application/json">>}],
         <<>>,112,3503}
Params: #{body => <<"{\"action\":\"subscribe\"}">>,method => <<"PUT">>,
          path =>
              <<"/api/contacts/bob_befriend_and_alienate_1746@domain.example.com/alice_befriend_and_alienate_1746@domain.example.com">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-07 16:05:13.699 ***
REST request:
Code: 200
Req: {<0.28464.1>,
      <<"/api/contacts/bob_befriend_and_alienate_1746@domain.example.com">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"db7485d638f7fa52">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 07 Mar 2022 16:05:13 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"97">>}],
         <<"[{\"subscription\":\"from\",\"jid\":\"alice_befriend_and_alienate_1746@domain.example.com\",\"ask\":\"out\"}]">>,
         221,1183}
Params: #{body => <<>>,method => <<"GET">>,
          path =>
              <<"/api/contacts/bob_befriend_and_alienate_1746@domain.example.com">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-07 16:05:13.740 ***
REST request:
Code: 204
Req: {<0.28466.1>,
      <<"/api/contacts/alice_befriend_and_alienate_1746@domain.example.com/bob_befriend_and_alienate_1746@domain.example.com">>,
      <<"PUT">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"d80e004be4e77885">>}],
      <<"{\"action\":\"subscribed\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 07 Mar 2022 16:05:13 GMT">>},
          {<<"content-type">>,<<"application/json">>}],
         <<>>,112,4004}
Params: #{body => <<"{\"action\":\"subscribed\"}">>,method => <<"PUT">>,
          path =>
              <<"/api/contacts/alice_befriend_and_alienate_1746@domain.example.com/bob_befriend_and_alienate_1746@domain.example.com">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-07 16:05:13.743 ***
REST request:
Code: 200
Req: {<0.28468.1>,
      <<"/api/contacts/alice_befriend_and_alienate_1746@domain.example.com">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"37ba72ea9a8fa630">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 07 Mar 2022 16:05:13 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"96">>}],
         <<"[{\"subscription\":\"both\",\"jid\":\"bob_befriend_and_alienate_1746@domain.example.com\",\"ask\":\"none\"}]">>,
         220,1714}
Params: #{body => <<>>,method => <<"GET">>,
          path =>
              <<"/api/contacts/alice_befriend_and_alienate_1746@domain.example.com">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-07 16:05:13.746 ***
REST request:
Code: 200
Req: {<0.28470.1>,
      <<"/api/contacts/bob_befriend_and_alienate_1746@domain.example.com">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"c452b100f1e1fce7">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 07 Mar 2022 16:05:13 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"98">>}],
         <<"[{\"subscription\":\"both\",\"jid\":\"alice_befriend_and_alienate_1746@domain.example.com\",\"ask\":\"none\"}]">>,
         222,1233}
Params: #{body => <<>>,method => <<"GET">>,
          path =>
              <<"/api/contacts/bob_befriend_and_alienate_1746@domain.example.com">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-07 16:05:13.754 ***
REST request:
Code: 204
Req: {<0.28472.1>,
      <<"/api/contacts/alice_befriend_and_alienate_1746@domain.example.com/bob_befriend_and_alienate_1746@domain.example.com">>,
      <<"DELETE">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"aac54f2deb24e799">>}],
      <<>>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 07 Mar 2022 16:05:13 GMT">>},
          {<<"content-type">>,<<"application/json">>}],
         <<>>,112,6219}
Params: #{body => <<>>,method => <<"DELETE">>,
          path =>
              <<"/api/contacts/alice_befriend_and_alienate_1746@domain.example.com/bob_befriend_and_alienate_1746@domain.example.com">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-07 16:05:13.756 ***
REST request:
Code: 200
Req: {<0.28474.1>,
      <<"/api/contacts/alice_befriend_and_alienate_1746@domain.example.com">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"33706200186167ed">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 07 Mar 2022 16:05:13 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"2">>}],
         <<"[]">>,125,1187}
Params: #{body => <<>>,method => <<"GET">>,
          path =>
              <<"/api/contacts/alice_befriend_and_alienate_1746@domain.example.com">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-07 16:05:13.759 ***
REST request:
Code: 200
Req: {<0.28476.1>,
      <<"/api/contacts/bob_befriend_and_alienate_1746@domain.example.com">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"a78c294eb78aab60">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 07 Mar 2022 16:05:13 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"98">>}],
         <<"[{\"subscription\":\"none\",\"jid\":\"alice_befriend_and_alienate_1746@domain.example.com\",\"ask\":\"none\"}]">>,
         222,1125}
Params: #{body => <<>>,method => <<"GET">>,
          path =>
              <<"/api/contacts/bob_befriend_and_alienate_1746@domain.example.com">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-07 16:05:13.762 ***
REST request:
Code: 204
Req: {<0.28478.1>,
      <<"/api/contacts/bob_befriend_and_alienate_1746@domain.example.com/alice_befriend_and_alienate_1746@domain.example.com">>,
      <<"DELETE">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"e83f93a0d50b7107">>}],
      <<>>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 07 Mar 2022 16:05:13 GMT">>},
          {<<"content-type">>,<<"application/json">>}],
         <<>>,112,2008}
Params: #{body => <<>>,method => <<"DELETE">>,
          path =>
              <<"/api/contacts/bob_befriend_and_alienate_1746@domain.example.com/alice_befriend_and_alienate_1746@domain.example.com">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-07 16:05:13.764 ***
REST request:
Code: 200
Req: {<0.28480.1>,
      <<"/api/contacts/bob_befriend_and_alienate_1746@domain.example.com">>,
      <<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"e39ce5a53004c414">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 07 Mar 2022 16:05:13 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"2">>}],
         <<"[]">>,125,1120}
Params: #{body => <<>>,method => <<"GET">>,
          path =>
              <<"/api/contacts/bob_befriend_and_alienate_1746@domain.example.com">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-07 16:05:13.765 ***
alicE_befriend_and_alienate_1746@domain.example.com/res1 in
<iq from='alice_befriend_and_alienate_1746@domain.example.com' to='alice_befriend_and_alienate_1746@domain.example.com/res1' id='pushefabaa37fc36f97e' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='none' jid='bob_befriend_and_alienate_1746@domain.example.com'/>
	</query>
</iq>



*** User 2022-03-07 16:05:13.765 ***
alicE_befriend_and_alienate_1746@domain.example.com/res1 in
<iq from='alice_befriend_and_alienate_1746@domain.example.com' to='alice_befriend_and_alienate_1746@domain.example.com/res1' id='push136b22396a14a9bc' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item ask='subscribe' subscription='none' jid='bob_befriend_and_alienate_1746@domain.example.com'/>
	</query>
</iq>



*** User 2022-03-07 16:05:13.765 ***
alicE_befriend_and_alienate_1746@domain.example.com/res1 in
<presence from='bOb_befriend_and_alienate_1746@domain.example.com/res1' to='alice_befriend_and_alienate_1746@domain.example.com/res1' xml:lang='en'/>



*** User 2022-03-07 16:05:13.765 ***
alicE_befriend_and_alienate_1746@domain.example.com/res1 in
<iq from='alice_befriend_and_alienate_1746@domain.example.com' to='alice_befriend_and_alienate_1746@domain.example.com/res1' id='pushfe71b71da690dd8d' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='to' jid='bob_befriend_and_alienate_1746@domain.example.com'/>
	</query>
</iq>



*** User 2022-03-07 16:05:13.765 ***
alicE_befriend_and_alienate_1746@domain.example.com/res1 in
<presence from='bob_befriend_and_alienate_1746@domain.example.com' to='alice_befriend_and_alienate_1746@domain.example.com/res1' type='subscribed'/>



*** User 2022-03-07 16:05:13.765 ***
alicE_befriend_and_alienate_1746@domain.example.com/res1 in
<iq from='alice_befriend_and_alienate_1746@domain.example.com' to='alice_befriend_and_alienate_1746@domain.example.com/res1' id='push115f76c2c96540ca' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='to' jid='bob_befriend_and_alienate_1746@domain.example.com'/>
	</query>
</iq>



*** User 2022-03-07 16:05:13.765 ***
alicE_befriend_and_alienate_1746@domain.example.com/res1 in
<presence from='bob_befriend_and_alienate_1746@domain.example.com' to='alice_befriend_and_alienate_1746@domain.example.com/res1' type='subscribe'/>



*** User 2022-03-07 16:05:13.765 ***
alicE_befriend_and_alienate_1746@domain.example.com/res1 in
<iq from='alice_befriend_and_alienate_1746@domain.example.com' to='alice_befriend_and_alienate_1746@domain.example.com/res1' id='push701fcddb34f655ae' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='both' jid='bob_befriend_and_alienate_1746@domain.example.com'/>
	</query>
</iq>



*** User 2022-03-07 16:05:13.765 ***
alicE_befriend_and_alienate_1746@domain.example.com/res1 in
<iq from='alice_befriend_and_alienate_1746@domain.example.com' to='alice_befriend_and_alienate_1746@domain.example.com/res1' id='pushdbf4bd4a787ea9eb' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='remove' jid='bob_befriend_and_alienate_1746@domain.example.com'/>
	</query>
</iq>



*** User 2022-03-07 16:05:13.765 ***
alicE_befriend_and_alienate_1746@domain.example.com/res1 in
<presence from='bOb_befriend_and_alienate_1746@domain.example.com/res1' to='alice_befriend_and_alienate_1746@domain.example.com/res1' type='unavailable'/>



*** User 2022-03-07 16:05:18.766 ***
bOb_befriend_and_alienate_1746@domain.example.com/res1 in
<iq from='bob_befriend_and_alienate_1746@domain.example.com' to='bob_befriend_and_alienate_1746@domain.example.com/res1' id='pushe07e42b05ea4f124' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='none' jid='alice_befriend_and_alienate_1746@domain.example.com'/>
	</query>
</iq>



*** User 2022-03-07 16:05:18.766 ***
bOb_befriend_and_alienate_1746@domain.example.com/res1 in
<presence from='alice_befriend_and_alienate_1746@domain.example.com' to='bob_befriend_and_alienate_1746@domain.example.com/res1' type='subscribe'/>



*** User 2022-03-07 16:05:18.766 ***
bOb_befriend_and_alienate_1746@domain.example.com/res1 in
<iq from='bob_befriend_and_alienate_1746@domain.example.com' to='bob_befriend_and_alienate_1746@domain.example.com/res1' id='push906009b68ca5749d' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='from' jid='alice_befriend_and_alienate_1746@domain.example.com'/>
	</query>
</iq>



*** User 2022-03-07 16:05:18.766 ***
bOb_befriend_and_alienate_1746@domain.example.com/res1 in
<iq from='bob_befriend_and_alienate_1746@domain.example.com' to='bob_befriend_and_alienate_1746@domain.example.com/res1' id='push279e301c2457af82' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item ask='subscribe' subscription='from' jid='alice_befriend_and_alienate_1746@domain.example.com'/>
	</query>
</iq>



*** User 2022-03-07 16:05:18.766 ***
bOb_befriend_and_alienate_1746@domain.example.com/res1 in
<presence from='alicE_befriend_and_alienate_1746@domain.example.com/res1' to='bob_befriend_and_alienate_1746@domain.example.com/res1' xml:lang='en'/>



*** User 2022-03-07 16:05:18.766 ***
bOb_befriend_and_alienate_1746@domain.example.com/res1 in
<iq from='bob_befriend_and_alienate_1746@domain.example.com' to='bob_befriend_and_alienate_1746@domain.example.com/res1' id='push70faf87794cc54f1' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='both' jid='alice_befriend_and_alienate_1746@domain.example.com'/>
	</query>
</iq>



*** User 2022-03-07 16:05:18.766 ***
bOb_befriend_and_alienate_1746@domain.example.com/res1 in
<presence from='alice_befriend_and_alienate_1746@domain.example.com' to='bob_befriend_and_alienate_1746@domain.example.com/res1' type='subscribed'/>



*** User 2022-03-07 16:05:18.766 ***
bOb_befriend_and_alienate_1746@domain.example.com/res1 in
<presence from='alicE_befriend_and_alienate_1746@domain.example.com/res1' to='bob_befriend_and_alienate_1746@domain.example.com/res1' type='unavailable'/>



*** User 2022-03-07 16:05:18.766 ***
bOb_befriend_and_alienate_1746@domain.example.com/res1 in
<iq from='bob_befriend_and_alienate_1746@domain.example.com' to='bob_befriend_and_alienate_1746@domain.example.com/res1' id='push370e51f05122fb52' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='to' jid='alice_befriend_and_alienate_1746@domain.example.com'/>
	</query>
</iq>



*** User 2022-03-07 16:05:18.766 ***
bOb_befriend_and_alienate_1746@domain.example.com/res1 in
<presence from='alice_befriend_and_alienate_1746@domain.example.com' to='bob_befriend_and_alienate_1746@domain.example.com/res1' type='unsubscribe'/>



*** User 2022-03-07 16:05:18.767 ***
bOb_befriend_and_alienate_1746@domain.example.com/res1 in
<iq from='bob_befriend_and_alienate_1746@domain.example.com' to='bob_befriend_and_alienate_1746@domain.example.com/res1' id='push0f508ba1ecf9c7df' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='none' jid='alice_befriend_and_alienate_1746@domain.example.com'/>
	</query>
</iq>



*** User 2022-03-07 16:05:18.767 ***
bOb_befriend_and_alienate_1746@domain.example.com/res1 in
<presence from='alice_befriend_and_alienate_1746@domain.example.com' to='bob_befriend_and_alienate_1746@domain.example.com/res1' type='unsubscribed'/>



*** User 2022-03-07 16:05:18.767 ***
bOb_befriend_and_alienate_1746@domain.example.com/res1 in
<iq from='bob_befriend_and_alienate_1746@domain.example.com' to='bob_befriend_and_alienate_1746@domain.example.com/res1' id='pushd0574a641002beae' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='remove' jid='alice_befriend_and_alienate_1746@domain.example.com'/>
	</query>
</iq>



*** User 2022-03-07 16:05:23.768 ***
bOb_befriend_and_alienate_1746@domain.example.com/res1 out
</stream:stream>

*** User 2022-03-07 16:05:23.768 ***
bOb_befriend_and_alienate_1746@domain.example.com/res1 in
</stream:stream>

*** User 2022-03-07 16:05:23.769 ***
alicE_befriend_and_alienate_1746@domain.example.com/res1 out
</stream:stream>

*** User 2022-03-07 16:05:23.769 ***
alicE_befriend_and_alienate_1746@domain.example.com/res1 in
</stream:stream>
*** CT 2022-03-07 16:05:23.772 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_533.html
*** CT 2022-03-07 16:05:23.774 *** View log from node mongooseim@localhost when finished mongooseim@localhost_1561.html



=== Ended at 2022-03-07 16:05:23
=== successfully completed test case
=== === Returned value: ok