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

=== Config value:

    [{watchdog,<0.56425.0>},
     {muc_light_host,<<"muclight.localhost">>},
     {mam_backend,disabled},
     {preset,"internal_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@8f270c211212.2024-04-22_14.32.33/big_tests.tests.rest_client_SUITE.logs/run.2024-04-22_14.47.00/rest_client_suite.roster_errors.104834.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@8f270c211212.2024-04-22_14.32.33/big_tests.tests.rest_client_SUITE.logs/run.2024-04-22_14.47.00/log_private/"},
     {{saved_modules,mongooseim@localhost,<<"localhost">>},
      #{mod_vcard =>
            #{matches => 30,
              host => {prefix,<<"vjud.">>},
              search => true,iqdisc => parallel,backend => mnesia},
        mod_roster =>
            #{iqdisc => one_queue,backend => mnesia,versioning => false,
              store_current_id => false},
        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_sic => #{iqdisc => one_queue},
        mod_presence => #{},
        mod_disco =>
            #{iqdisc => one_queue,server_info => [],extra_domains => [],
              users_can_see_hidden_services => false},
        mod_stream_management =>
            #{buffer => true,ack => true,backend => mnesia,buffer_max => 100,
              stale_h =>
                  #{enabled => false,repeat_after => 1800,geriatric => 3600},
              ack_freq => 1,resume_timeout => 600},
        mod_adhoc => #{iqdisc => one_queue,report_commands_node => false},
        mod_bosh =>
            #{backend => mnesia,inactivity => 30,max_pause => 120,
              max_wait => infinity,server_acks => false},
        mod_cache_users =>
            #{strategy => fifo,number_of_segments => 5,time_to_live => 2},
        mod_carboncopy => #{iqdisc => no_queue}}}]

=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@8f270c211212.2024-04-22_14.32.33"

=== Started at 2024-04-22 14:47:02


*** CT 2024-04-22 14:47:02.078 *** View log from node mongooseim@localhost when started🔗 mongooseim@localhost_4695.html

*** User 2024-04-22 14:47:02.121 ***🔗
alicE_roster_errors_1870@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2024-04-22 14:47:02.122 ***🔗
alicE_roster_errors_1870@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='0bceae8d709b909a' from='localhost' version='1.0' xml:lang='en'>

*** User 2024-04-22 14:47:02.122 ***🔗
alicE_roster_errors_1870@localhost/res1 in
<stream:features>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
	<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
		<mechanism>SCRAM-SHA-256</mechanism>
		<mechanism>PLAIN</mechanism>
	</mechanisms>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2024-04-22 14:47:02.122 ***🔗
alicE_roster_errors_1870@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX3Jvc3Rlcl9lcnJvcnNfMTg3MABtYXR5Z3J5c2E=</auth>



*** User 2024-04-22 14:47:02.122 ***🔗
alicE_roster_errors_1870@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2024-04-22 14:47:02.122 ***🔗
alicE_roster_errors_1870@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2024-04-22 14:47:02.123 ***🔗
alicE_roster_errors_1870@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='81260db0b6be1516' from='localhost' version='1.0' xml:lang='en' to='alice_roster_errors_1870@localhost'>

*** User 2024-04-22 14:47:02.123 ***🔗
alicE_roster_errors_1870@localhost/res1 in
<stream:features>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2024-04-22 14:47:02.123 ***🔗
alicE_roster_errors_1870@localhost/res1 out
<iq type='set' id='89d8333c2f2718a450b12518636926da'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2024-04-22 14:47:02.123 ***🔗
alicE_roster_errors_1870@localhost/res1 in
<iq id='89d8333c2f2718a450b12518636926da' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alice_roster_errors_1870@localhost/res1</jid>
	</bind>
</iq>



*** User 2024-04-22 14:47:02.123 ***🔗
alice_roster_errors_1870@localhost/res1 out
<iq type='set' id='836b01595e71ff6f7ac00b08c1b201ce'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-22 14:47:02.124 ***🔗
alice_roster_errors_1870@localhost/res1 in
<iq from='localhost' to='alice_roster_errors_1870@localhost/res1' id='836b01595e71ff6f7ac00b08c1b201ce' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-22 14:47:02.124 ***🔗
alice_roster_errors_1870@localhost/res1 out
<presence/>



*** User 2024-04-22 14:47:02.125 ***🔗
alice_roster_errors_1870@localhost/res1 in
<presence from='alice_roster_errors_1870@localhost/res1' to='alice_roster_errors_1870@localhost/res1'/>



*** User 2024-04-22 14:47:02.125 ***🔗
bOb_roster_errors_1870@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2024-04-22 14:47:02.126 ***🔗
bOb_roster_errors_1870@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='dced0649d3fd552d' from='localhost' version='1.0' xml:lang='en'>

*** User 2024-04-22 14:47:02.126 ***🔗
bOb_roster_errors_1870@localhost/res1 in
<stream:features>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
	<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
		<mechanism>SCRAM-SHA-256</mechanism>
		<mechanism>PLAIN</mechanism>
	</mechanisms>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2024-04-22 14:47:02.126 ***🔗
bOb_roster_errors_1870@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9yb3N0ZXJfZXJyb3JzXzE4NzAAbWFrcm9saWth</auth>



*** User 2024-04-22 14:47:02.126 ***🔗
bOb_roster_errors_1870@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2024-04-22 14:47:02.126 ***🔗
bOb_roster_errors_1870@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2024-04-22 14:47:02.126 ***🔗
bOb_roster_errors_1870@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='be62584c343896b2' from='localhost' version='1.0' xml:lang='en' to='bob_roster_errors_1870@localhost'>

*** User 2024-04-22 14:47:02.126 ***🔗
bOb_roster_errors_1870@localhost/res1 in
<stream:features>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2024-04-22 14:47:02.127 ***🔗
bOb_roster_errors_1870@localhost/res1 out
<iq type='set' id='92aef89c9970f70e09fda8ff46a8041e'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2024-04-22 14:47:02.127 ***🔗
bOb_roster_errors_1870@localhost/res1 in
<iq id='92aef89c9970f70e09fda8ff46a8041e' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bob_roster_errors_1870@localhost/res1</jid>
	</bind>
</iq>



*** User 2024-04-22 14:47:02.127 ***🔗
bob_roster_errors_1870@localhost/res1 out
<iq type='set' id='8a3aaa8dde46f3ee34668011f0e1e9e6'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-22 14:47:02.127 ***🔗
bob_roster_errors_1870@localhost/res1 in
<iq from='localhost' to='bob_roster_errors_1870@localhost/res1' id='8a3aaa8dde46f3ee34668011f0e1e9e6' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-22 14:47:02.127 ***🔗
bob_roster_errors_1870@localhost/res1 out
<presence/>



*** User 2024-04-22 14:47:02.128 ***🔗
bob_roster_errors_1870@localhost/res1 in
<presence from='bob_roster_errors_1870@localhost/res1' to='bob_roster_errors_1870@localhost/res1'/>



*** User 2024-04-22 14:47:02.135 ***🔗
REST request fails:
Code: 400
Req: {<0.56496.0>,<<"/api/contacts">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"c06766e0b95be4b2">>},
       {<<"authorization">>,
        <<"Basic Ym9iX3Jvc3Rlcl9lcnJvcnNfMTg3MEBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
      <<"{}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 22 Apr 2024 14:47:01 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"13">>}],
         <<"\"Missing JID\"">>,146,722}
Params: #{path => <<"/api/contacts">>,
          server => #{node => mongooseim@localhost},
          role => client,method => <<"POST">>,body => <<"{}">>,
          creds => {<<"bob_roster_errors_1870@localhost">>,<<"makrolika">>},
          return_headers => true}


*** User 2024-04-22 14:47:02.143 ***🔗
REST request fails:
Code: 400
Req: {<0.56522.0>,<<"/api/contacts">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"60572fc3ec5233bd">>},
       {<<"authorization">>,
        <<"Basic Ym9iX3Jvc3Rlcl9lcnJvcnNfMTg3MEBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
      <<"{\"jid\":\"@invalid\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 22 Apr 2024 14:47:01 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"23">>}],
         <<"\"Invalid JID: @invalid\"">>,156,738}
Params: #{path => <<"/api/contacts">>,
          server => #{node => mongooseim@localhost},
          role => client,method => <<"POST">>,
          body => <<"{\"jid\":\"@invalid\"}">>,
          creds => {<<"bob_roster_errors_1870@localhost">>,<<"makrolika">>},
          return_headers => true}


*** User 2024-04-22 14:47:02.152 ***🔗
REST request fails:
Code: 400
Req: {<0.56558.0>,<<"/api/contacts/alice_roster_errors_1870@localhost">>,
      <<"PUT">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"df5909774790f871">>},
       {<<"authorization">>,
        <<"Basic Ym9iX3Jvc3Rlcl9lcnJvcnNfMTg3MEBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
      <<"{\"action\":\"nosuchaction\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 22 Apr 2024 14:47:01 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"16">>}],
         <<"\"Invalid action\"">>,149,604}
Params: #{path => <<"/api/contacts/alice_roster_errors_1870@localhost">>,
          server => #{node => mongooseim@localhost},
          role => client,method => <<"PUT">>,
          body => <<"{\"action\":\"nosuchaction\"}">>,
          creds => {<<"bob_roster_errors_1870@localhost">>,<<"makrolika">>},
          return_headers => true}


*** User 2024-04-22 14:47:02.160 ***🔗
REST request fails:
Code: 400
Req: {<0.56600.0>,<<"/api/contacts/alice_roster_errors_1870@localhost">>,
      <<"PUT">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"cd986a1bd0e173ab">>},
       {<<"authorization">>,
        <<"Basic Ym9iX3Jvc3Rlcl9lcnJvcnNfMTg3MEBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
      <<"{}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 22 Apr 2024 14:47:01 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"16">>}],
         <<"\"Missing action\"">>,149,540}
Params: #{path => <<"/api/contacts/alice_roster_errors_1870@localhost">>,
          server => #{node => mongooseim@localhost},
          role => client,method => <<"PUT">>,body => <<"{}">>,
          creds => {<<"bob_roster_errors_1870@localhost">>,<<"makrolika">>},
          return_headers => true}


*** User 2024-04-22 14:47:02.193 ***🔗
REST request fails:
Code: 404
Req: {<0.56634.0>,<<"/api/contacts">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"6a8e83e5f46fdcd2">>},
       {<<"authorization">>,
        <<"Basic Ym9iX3Jvc3Rlcl9lcnJvcnNfMTg3MEBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
      <<"{\"jid\":\"zorro@localhost\"}">>}
Result: {{<<"404">>,<<"Not Found">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 22 Apr 2024 14:47:01 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"41">>}],
         <<"\"The user zorro@localhost does not exist\"">>,172,663}
Params: #{path => <<"/api/contacts">>,
          server => #{node => mongooseim@localhost},
          role => client,method => <<"POST">>,
          body => <<"{\"jid\":\"zorro@localhost\"}">>,
          creds => {<<"bob_roster_errors_1870@localhost">>,<<"makrolika">>},
          return_headers => true}


*** User 2024-04-22 14:47:02.201 ***🔗
REST request fails:
Code: 404
Req: {<0.56643.0>,<<"/api/contacts/zorro@localhost">>,<<"PUT">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"74b038076a71684b">>},
       {<<"authorization">>,
        <<"Basic Ym9iX3Jvc3Rlcl9lcnJvcnNfMTg3MEBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
      <<"{\"action\":\"invite\"}">>}
Result: {{<<"404">>,<<"Not Found">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 22 Apr 2024 14:47:01 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"30">>}],
         <<"\"Given contact does not exist\"">>,161,663}
Params: #{path => <<"/api/contacts/zorro@localhost">>,
          server => #{node => mongooseim@localhost},
          role => client,method => <<"PUT">>,
          body => <<"{\"action\":\"invite\"}">>,
          creds => {<<"bob_roster_errors_1870@localhost">>,<<"makrolika">>},
          return_headers => true}


*** User 2024-04-22 14:47:02.208 ***🔗
REST request fails:
Code: 404
Req: {<0.56673.0>,<<"/api/contacts/zorro@localhost">>,<<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"94da99ec05804287">>},
       {<<"authorization">>,
        <<"Basic Ym9iX3Jvc3Rlcl9lcnJvcnNfMTg3MEBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
      <<>>}
Result: {{<<"404">>,<<"Not Found">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 22 Apr 2024 14:47:01 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"32">>}],
         <<"\"JID provided but not supported\"">>,163,465}
Params: #{path => <<"/api/contacts/zorro@localhost">>,
          server => #{node => mongooseim@localhost},
          role => client,method => <<"GET">>,body => <<>>,
          creds => {<<"bob_roster_errors_1870@localhost">>,<<"makrolika">>},
          return_headers => true}


*** User 2024-04-22 14:47:02.215 ***🔗
REST request fails:
Code: 404
Req: {<0.56687.0>,<<"/api/contacts/zorro@localhost">>,<<"DELETE">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"ea36978e7003509a">>},
       {<<"authorization">>,
        <<"Basic Ym9iX3Jvc3Rlcl9lcnJvcnNfMTg3MEBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
      <<>>}
Result: {{<<"404">>,<<"Not Found">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 22 Apr 2024 14:47:01 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"59">>}],
         <<"\"Cannot remove zorro@localhost contact that does not exist\"">>,
         190,629}
Params: #{path => <<"/api/contacts/zorro@localhost">>,
          server => #{node => mongooseim@localhost},
          role => client,method => <<"DELETE">>,body => <<>>,
          creds => {<<"bob_roster_errors_1870@localhost">>,<<"makrolika">>},
          return_headers => true}


*** User 2024-04-22 14:47:02.215 ***🔗
bob_roster_errors_1870@localhost/res1 out
</stream:stream>

*** User 2024-04-22 14:47:02.215 ***🔗
bob_roster_errors_1870@localhost/res1 in
</stream:stream>

*** User 2024-04-22 14:47:02.215 ***🔗
alice_roster_errors_1870@localhost/res1 out
</stream:stream>

*** User 2024-04-22 14:47:02.215 ***🔗
alice_roster_errors_1870@localhost/res1 in
</stream:stream>
*** CT 2024-04-22 14:47:02.228 *** View log from node mongooseim@localhost when finished🔗 mongooseim@localhost_4695.html



=== Ended at 2024-04-22 14:47:02
=== successfully completed test case
=== === Returned value: ok