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

=== Config value:

    [{watchdog,<0.89507.0>},
     {muc_light_host,<<"muclight.localhost">>},
     {mam_backend,rdbms},
     {preset,"mysql_redis"},
     {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@cec807ac1e64.2024-04-22_17.28.38/big_tests.tests.rest_client_SUITE.logs/run.2024-04-22_17.45.00/rest_client_suite.user_removal_errors.59269.html"},
     {tc_group_properties,[{name,muc},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@cec807ac1e64.2024-04-22_17.28.38/big_tests.tests.rest_client_SUITE.logs/run.2024-04-22_17.45.00/log_private/"},
     {{saved_modules,mongooseim@localhost,<<"localhost">>},
      #{mod_vcard =>
            #{matches => 30,
              host => {prefix,<<"vjud.">>},
              search => true,iqdisc => parallel,backend => rdbms},
        mod_roster =>
            #{iqdisc => one_queue,backend => rdbms,versioning => false,
              store_current_id => false},
        mod_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_amp => #{},mod_presence => #{},
        mod_disco =>
            #{server_info => [],iqdisc => one_queue,extra_domains => [],
              users_can_see_hidden_services => false},
        mod_stream_management =>
            #{buffer => true,ack => true,backend => mnesia,
              stale_h =>
                  #{enabled => false,repeat_after => 1800,geriatric => 3600},
              buffer_max => 100,ack_freq => 1,resume_timeout => 600},
        mod_adhoc => #{iqdisc => one_queue,report_commands_node => false},
        mod_bosh =>
            #{inactivity => 30,max_pause => 120,max_wait => infinity,
              server_acks => false,backend => mnesia},
        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@cec807ac1e64.2024-04-22_17.28.38"

=== Started at 2024-04-22 17:45:00


*** CT 2024-04-22 17:45:00.972 *** View log from node mongooseim@localhost when started🔗 mongooseim@localhost_5631.html

*** User 2024-04-22 17:45:01.074 ***🔗
alicE_user_removal_errors_3215@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 17:45:01.075 ***🔗
alicE_user_removal_errors_3215@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='ff4d1f8c7b777f0a' from='localhost' version='1.0' xml:lang='en'>

*** User 2024-04-22 17:45:01.076 ***🔗
alicE_user_removal_errors_3215@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 17:45:01.076 ***🔗
alicE_user_removal_errors_3215@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX3VzZXJfcmVtb3ZhbF9lcnJvcnNfMzIxNQBtYXR5Z3J5c2E=</auth>



*** User 2024-04-22 17:45:01.078 ***🔗
alicE_user_removal_errors_3215@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2024-04-22 17:45:01.079 ***🔗
alicE_user_removal_errors_3215@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 17:45:01.080 ***🔗
alicE_user_removal_errors_3215@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='7741687db6edfe08' from='localhost' version='1.0' xml:lang='en' to='alice_user_removal_errors_3215@localhost'>

*** User 2024-04-22 17:45:01.081 ***🔗
alicE_user_removal_errors_3215@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 17:45:01.082 ***🔗
alicE_user_removal_errors_3215@localhost/res1 out
<iq type='set' id='45aea7a7070a6e5f4ab83d8e4d8f8078'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2024-04-22 17:45:01.082 ***🔗
alicE_user_removal_errors_3215@localhost/res1 in
<iq id='45aea7a7070a6e5f4ab83d8e4d8f8078' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alice_user_removal_errors_3215@localhost/res1</jid>
	</bind>
</iq>



*** User 2024-04-22 17:45:01.082 ***🔗
alice_user_removal_errors_3215@localhost/res1 out
<iq type='set' id='c5a79ff072361c5ca04dfc7ff890ab8a'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-22 17:45:01.084 ***🔗
alice_user_removal_errors_3215@localhost/res1 in
<iq from='localhost' to='alice_user_removal_errors_3215@localhost/res1' id='c5a79ff072361c5ca04dfc7ff890ab8a' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-22 17:45:01.085 ***🔗
alice_user_removal_errors_3215@localhost/res1 out
<presence/>



*** User 2024-04-22 17:45:01.143 ***🔗
alice_user_removal_errors_3215@localhost/res1 in
<presence from='alice_user_removal_errors_3215@localhost/res1' to='alice_user_removal_errors_3215@localhost/res1'/>



*** User 2024-04-22 17:45:01.146 ***🔗
bOb_user_removal_errors_3215@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 17:45:01.147 ***🔗
bOb_user_removal_errors_3215@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='2944d86ea622a53f' from='localhost' version='1.0' xml:lang='en'>

*** User 2024-04-22 17:45:01.147 ***🔗
bOb_user_removal_errors_3215@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 17:45:01.147 ***🔗
bOb_user_removal_errors_3215@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl91c2VyX3JlbW92YWxfZXJyb3JzXzMyMTUAbWFrcm9saWth</auth>



*** User 2024-04-22 17:45:01.152 ***🔗
bOb_user_removal_errors_3215@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2024-04-22 17:45:01.152 ***🔗
bOb_user_removal_errors_3215@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 17:45:01.158 ***🔗
bOb_user_removal_errors_3215@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='047b07ddd2463b5b' from='localhost' version='1.0' xml:lang='en' to='bob_user_removal_errors_3215@localhost'>

*** User 2024-04-22 17:45:01.158 ***🔗
bOb_user_removal_errors_3215@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 17:45:01.158 ***🔗
bOb_user_removal_errors_3215@localhost/res1 out
<iq type='set' id='4343b2307f032b126e7bf629eed5b79d'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2024-04-22 17:45:01.158 ***🔗
bOb_user_removal_errors_3215@localhost/res1 in
<iq id='4343b2307f032b126e7bf629eed5b79d' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bob_user_removal_errors_3215@localhost/res1</jid>
	</bind>
</iq>



*** User 2024-04-22 17:45:01.158 ***🔗
bob_user_removal_errors_3215@localhost/res1 out
<iq type='set' id='c3c0b8f52eff1071334312a954870393'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-22 17:45:01.160 ***🔗
bob_user_removal_errors_3215@localhost/res1 in
<iq from='localhost' to='bob_user_removal_errors_3215@localhost/res1' id='c3c0b8f52eff1071334312a954870393' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-22 17:45:01.160 ***🔗
bob_user_removal_errors_3215@localhost/res1 out
<presence/>



*** User 2024-04-22 17:45:01.173 ***🔗
bob_user_removal_errors_3215@localhost/res1 in
<presence from='bob_user_removal_errors_3215@localhost/res1' to='bob_user_removal_errors_3215@localhost/res1'/>



*** User 2024-04-22 17:45:01.253 ***🔗
REST request:
Code: 201
Req: {<0.89889.0>,<<"/api/rooms">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"8fe56e229a1a9a02">>},
       {<<"authorization">>,
        <<"Basic YWxpY2VfdXNlcl9yZW1vdmFsX2Vycm9yc18zMjE1QGxvY2FsaG9zdDptYXR5Z3J5c2E=">>}],
      <<"{\"subject\":\"This room subject\",\"name\":\"new_room_name\"}">>}
Result: {{<<"201">>,<<"Created">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 22 Apr 2024 17:45:01 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"27">>}],
         <<"{\"id\":\"1713-807901-244973\"}">>,156,72725}
Params: #{path => <<"/api/rooms">>,
          server => #{node => mongooseim@localhost},
          creds =>
              {<<"alice_user_removal_errors_3215@localhost">>,<<"matygrysa">>},
          method => <<"POST">>,role => client,
          body =>
              <<"{\"subject\":\"This room subject\",\"name\":\"new_room_name\"}">>,
          return_headers => true}


*** User 2024-04-22 17:45:01.363 ***🔗
REST request:
Code: 204
Req: {<0.89979.0>,<<"/api/rooms/1713-807901-244973/users">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"19b9ebf2cd68aea4">>},
       {<<"authorization">>,
        <<"Basic YWxpY2VfdXNlcl9yZW1vdmFsX2Vycm9yc18zMjE1QGxvY2FsaG9zdDptYXR5Z3J5c2E=">>}],
      <<"{\"user\":\"bob_user_removal_errors_3215@localhost\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 22 Apr 2024 17:45:01 GMT">>}],
         <<>>,80,103309}
Params: #{path => <<"/api/rooms/1713-807901-244973/users">>,
          server => #{node => mongooseim@localhost},
          creds =>
              {<<"alice_user_removal_errors_3215@localhost">>,<<"matygrysa">>},
          method => <<"POST">>,role => client,
          body => <<"{\"user\":\"bob_user_removal_errors_3215@localhost\"}">>,
          return_headers => true}


*** User 2024-04-22 17:45:01.363 ***🔗
bob_user_removal_errors_3215@localhost/res1 in
<message from='1713-807901-244973@muclight.localhost' to='bob_user_removal_errors_3215@localhost' id='9f040d18-7b0e-4a08-886a-1a26d4445437' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<version>1713-807901-344460</version>
		<user affiliation='member'>bob_user_removal_errors_3215@localhost</user>
	</x>
	<body/>
</message>



*** User 2024-04-22 17:45:01.363 ***🔗
alice_user_removal_errors_3215@localhost/res1 in
<message from='1713-807901-244973@muclight.localhost' to='alice_user_removal_errors_3215@localhost' id='9f040d18-7b0e-4a08-886a-1a26d4445437' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<prev-version>1713-807901-244963</prev-version>
		<version>1713-807901-344460</version>
		<user affiliation='member'>bob_user_removal_errors_3215@localhost</user>
	</x>
	<body/>
	<stanza-id by='1713-807901-244973@muclight.localhost' id='C5LIVSLKH981' xmlns='urn:xmpp:sid:0'/>
</message>



*** User 2024-04-22 17:45:01.374 ***🔗
REST request fails:
Code: 400
Req: {<0.90192.0>,<<"/api/rooms/1713-807901-244973/users/@invalid">>,
      <<"DELETE">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"64ebad4576f5cb15">>},
       {<<"authorization">>,
        <<"Basic YWxpY2VfdXNlcl9yZW1vdmFsX2Vycm9yc18zMjE1QGxvY2FsaG9zdDptYXR5Z3J5c2E=">>}],
      <<>>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 22 Apr 2024 17:45:01 GMT">>},
          {<<"content-type">>,<<"text/html">>},
          {<<"content-length">>,<<"28">>}],
         <<"\"Invalid user JID: @invalid\"">>,154,2274}
Params: #{path => <<"/api/rooms/1713-807901-244973/users/@invalid">>,
          server => #{node => mongooseim@localhost},
          creds =>
              {<<"alice_user_removal_errors_3215@localhost">>,<<"matygrysa">>},
          method => <<"DELETE">>,role => client,body => <<>>,
          return_headers => true}


*** User 2024-04-22 17:45:01.382 ***🔗
REST request fails:
Code: 400
Req: {<0.90229.0>,<<"/api/rooms/1713-807901-244973/users/">>,<<"DELETE">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"16e78fbe8bf9f6d3">>},
       {<<"authorization">>,
        <<"Basic YWxpY2VfdXNlcl9yZW1vdmFsX2Vycm9yc18zMjE1QGxvY2FsaG9zdDptYXR5Z3J5c2E=">>}],
      <<>>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 22 Apr 2024 17:45:01 GMT">>},
          {<<"content-type">>,<<"text/html">>},
          {<<"content-length">>,<<"13">>}],
         <<"\"Missing JID\"">>,139,1739}
Params: #{path => <<"/api/rooms/1713-807901-244973/users/">>,
          server => #{node => mongooseim@localhost},
          creds =>
              {<<"alice_user_removal_errors_3215@localhost">>,<<"matygrysa">>},
          method => <<"DELETE">>,role => client,body => <<>>,
          return_headers => true}


*** User 2024-04-22 17:45:01.457 ***🔗
REST request fails:
Code: 403
Req: {<0.90263.0>,
      <<"/api/rooms/1713-807901-244973/users/alice_user_removal_errors_3215@localhost">>,
      <<"DELETE">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"47f434727df138ba">>},
       {<<"authorization">>,
        <<"Basic Ym9iX3VzZXJfcmVtb3ZhbF9lcnJvcnNfMzIxNUBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
      <<>>}
Result: {{<<"403">>,<<"Forbidden">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 22 Apr 2024 17:45:01 GMT">>},
          {<<"content-type">>,<<"text/html">>},
          {<<"content-length">>,<<"60">>}],
         <<"\"Given user does not have permission to change affiliations\"">>,
         184,5181}
Params: #{path =>
              <<"/api/rooms/1713-807901-244973/users/alice_user_removal_errors_3215@localhost">>,
          server => #{node => mongooseim@localhost},
          creds =>
              {<<"bob_user_removal_errors_3215@localhost">>,<<"makrolika">>},
          method => <<"DELETE">>,role => client,body => <<>>,
          return_headers => true}


*** User 2024-04-22 17:45:01.467 ***🔗
REST request fails:
Code: 404
Req: {<0.90321.0>,
      <<"/api/rooms/badroom/users/bob_user_removal_errors_3215@localhost">>,
      <<"DELETE">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"e6898d79e336dc7e">>},
       {<<"authorization">>,
        <<"Basic YWxpY2VfdXNlcl9yZW1vdmFsX2Vycm9yc18zMjE1QGxvY2FsaG9zdDptYXR5Z3J5c2E=">>}],
      <<>>}
Result: {{<<"404">>,<<"Not Found">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 22 Apr 2024 17:45:01 GMT">>},
          {<<"content-type">>,<<"text/html">>},
          {<<"content-length">>,<<"16">>}],
         <<"\"Room not found\"">>,140,3141}
Params: #{path =>
              <<"/api/rooms/badroom/users/bob_user_removal_errors_3215@localhost">>,
          server => #{node => mongooseim@localhost},
          creds =>
              {<<"alice_user_removal_errors_3215@localhost">>,<<"matygrysa">>},
          method => <<"DELETE">>,role => client,body => <<>>,
          return_headers => true}


*** User 2024-04-22 17:45:01.467 ***🔗
bob_user_removal_errors_3215@localhost/res1 out
</stream:stream>

*** User 2024-04-22 17:45:01.467 ***🔗
bob_user_removal_errors_3215@localhost/res1 in
</stream:stream>

*** User 2024-04-22 17:45:01.468 ***🔗
alice_user_removal_errors_3215@localhost/res1 out
</stream:stream>

*** User 2024-04-22 17:45:01.468 ***🔗
alice_user_removal_errors_3215@localhost/res1 in
</stream:stream>
*** CT 2024-04-22 17:45:01.544 *** View log from node mongooseim@localhost when finished🔗 mongooseim@localhost_5631.html



=== Ended at 2024-04-22 17:45:01
=== successfully completed test case
=== === Returned value: ok