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

=== Config value:

    [{watchdog,<0.55097.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@128b3716d043.2024-03-21_07.35.33/big_tests.tests.rest_client_SUITE.logs/run.2024-03-21_07.48.54/rest_client_suite.owner_can_leave_a_room_and_auto_select_owner.29701.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@128b3716d043.2024-03-21_07.35.33/big_tests.tests.rest_client_SUITE.logs/run.2024-03-21_07.48.54/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_sic => #{iqdisc => one_queue},
        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_amp => #{},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,
              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_cache_users =>
            #{strategy => fifo,number_of_segments => 5,time_to_live => 2},
        mod_bosh =>
            #{backend => mnesia,inactivity => 30,max_pause => 120,
              max_wait => infinity,server_acks => false},
        mod_carboncopy => #{iqdisc => no_queue}}}]

=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@128b3716d043.2024-03-21_07.35.33"

=== Started at 2024-03-21 07:48:54


*** CT 2024-03-21 07:48:55.011 *** View log from node mongooseim@localhost when started🔗 mongooseim@localhost_4612.html

*** User 2024-03-21 07:48:55.039 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_1800@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-03-21 07:48:55.040 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='3d9922e092dc880a' from='localhost' version='1.0' xml:lang='en'>

*** User 2024-03-21 07:48:55.040 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_1800@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-03-21 07:48:55.040 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX293bmVyX2Nhbl9sZWF2ZV9hX3Jvb21fYW5kX2F1dG9fc2VsZWN0X293bmVyXzE4MDAAbWF0eWdyeXNh</auth>



*** User 2024-03-21 07:48:55.041 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2024-03-21 07:48:55.041 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_1800@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-03-21 07:48:55.042 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='b15c0b19ce3a7436' from='localhost' version='1.0' xml:lang='en' to='alice_owner_can_leave_a_room_and_auto_select_owner_1800@localhost'>

*** User 2024-03-21 07:48:55.042 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_1800@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-03-21 07:48:55.042 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1 out
<iq type='set' id='b44de591df0a69edad0d2dd03b08b594'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2024-03-21 07:48:55.043 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1 in
<iq id='b44de591df0a69edad0d2dd03b08b594' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alice_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1</jid>
	</bind>
</iq>



*** User 2024-03-21 07:48:55.043 ***🔗
alice_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1 out
<iq type='set' id='20849c1f9cf20681c3a0fd17e542d32d'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-03-21 07:48:55.043 ***🔗
alice_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1 in
<iq from='localhost' to='alice_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1' id='20849c1f9cf20681c3a0fd17e542d32d' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-03-21 07:48:55.044 ***🔗
alice_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1 out
<presence/>



*** User 2024-03-21 07:48:55.045 ***🔗
alice_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1 in
<presence from='alice_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1' to='alice_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1'/>



*** User 2024-03-21 07:48:55.046 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_1800@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-03-21 07:48:55.047 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='e5f1b70aca3eeec8' from='localhost' version='1.0' xml:lang='en'>

*** User 2024-03-21 07:48:55.047 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_1800@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-03-21 07:48:55.047 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9vd25lcl9jYW5fbGVhdmVfYV9yb29tX2FuZF9hdXRvX3NlbGVjdF9vd25lcl8xODAwAG1ha3JvbGlrYQ==</auth>



*** User 2024-03-21 07:48:55.047 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2024-03-21 07:48:55.048 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_1800@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-03-21 07:48:55.048 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='13355b504d9158b9' from='localhost' version='1.0' xml:lang='en' to='bob_owner_can_leave_a_room_and_auto_select_owner_1800@localhost'>

*** User 2024-03-21 07:48:55.049 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_1800@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-03-21 07:48:55.049 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1 out
<iq type='set' id='3f2bd2371ded9135b10c47157770da7e'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2024-03-21 07:48:55.050 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1 in
<iq id='3f2bd2371ded9135b10c47157770da7e' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bob_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1</jid>
	</bind>
</iq>



*** User 2024-03-21 07:48:55.050 ***🔗
bob_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1 out
<iq type='set' id='130b2a1f396d72aee91838c2d3097ca6'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-03-21 07:48:55.051 ***🔗
bob_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1 in
<iq from='localhost' to='bob_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1' id='130b2a1f396d72aee91838c2d3097ca6' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-03-21 07:48:55.053 ***🔗
bob_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1 out
<presence/>



*** User 2024-03-21 07:48:55.054 ***🔗
bob_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1 in
<presence from='bob_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1' to='bob_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1'/>



*** User 2024-03-21 07:48:55.090 ***🔗
REST request:
Code: 201
Req: {<0.55431.0>,<<"/api/rooms">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"250581bb23fb9580">>},
       {<<"authorization">>,
        <<"Basic YWxpY2Vfb3duZXJfY2FuX2xlYXZlX2Ffcm9vbV9hbmRfYXV0b19zZWxlY3Rfb3duZXJfMTgwMEBsb2NhbGhvc3Q6bWF0eWdyeXNh">>}],
      <<"{\"subject\":\"This room subject\",\"name\":\"new_room_name\"}">>}
Result: {{<<"201">>,<<"Created">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 21 Mar 2024 07:48:54 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"24">>}],
         <<"{\"id\":\"1711-7335-85172\"}">>,153,7095}
Params: #{path => <<"/api/rooms">>,
          server => #{node => mongooseim@localhost},
          role => client,
          body =>
              <<"{\"subject\":\"This room subject\",\"name\":\"new_room_name\"}">>,
          method => <<"POST">>,
          creds =>
              {<<"alice_owner_can_leave_a_room_and_auto_select_owner_1800@localhost">>,
               <<"matygrysa">>},
          return_headers => true}


*** User 2024-03-21 07:48:55.105 ***🔗
REST request:
Code: 204
Req: {<0.55558.0>,<<"/api/rooms/1711-7335-85172/users">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"da8f6999044fbe35">>},
       {<<"authorization">>,
        <<"Basic YWxpY2Vfb3duZXJfY2FuX2xlYXZlX2Ffcm9vbV9hbmRfYXV0b19zZWxlY3Rfb3duZXJfMTgwMEBsb2NhbGhvc3Q6bWF0eWdyeXNh">>}],
      <<"{\"user\":\"bob_owner_can_leave_a_room_and_auto_select_owner_1800@localhost\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 21 Mar 2024 07:48:54 GMT">>}],
         <<>>,80,3687}
Params: #{path => <<"/api/rooms/1711-7335-85172/users">>,
          server => #{node => mongooseim@localhost},
          role => client,
          body =>
              <<"{\"user\":\"bob_owner_can_leave_a_room_and_auto_select_owner_1800@localhost\"}">>,
          method => <<"POST">>,
          creds =>
              {<<"alice_owner_can_leave_a_room_and_auto_select_owner_1800@localhost">>,
               <<"matygrysa">>},
          return_headers => true}


*** User 2024-03-21 07:48:55.105 ***🔗
bob_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1 in
<message from='1711-7335-85172@muclight.localhost' to='bob_owner_can_leave_a_room_and_auto_select_owner_1800@localhost' id='c7a93082-7eff-4e84-9b26-94ca1eb1d636' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<version>1711-7335-103518</version>
		<user affiliation='member'>bob_owner_can_leave_a_room_and_auto_select_owner_1800@localhost</user>
	</x>
	<body/>
</message>



*** User 2024-03-21 07:48:55.105 ***🔗
alice_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1 in
<message from='1711-7335-85172@muclight.localhost' to='alice_owner_can_leave_a_room_and_auto_select_owner_1800@localhost' id='c7a93082-7eff-4e84-9b26-94ca1eb1d636' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<prev-version>1711-7335-85008</prev-version>
		<version>1711-7335-103518</version>
		<user affiliation='member'>bob_owner_can_leave_a_room_and_auto_select_owner_1800@localhost</user>
	</x>
	<body/>
</message>



*** User 2024-03-21 07:48:55.173 ***🔗
REST request:
Code: 204
Req: {<0.55654.0>,
      <<"/api/rooms/1711-7335-85172/users/alice_owner_can_leave_a_room_and_auto_select_owner_1800@localhost">>,
      <<"DELETE">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"8c1ea1632658591c">>},
       {<<"authorization">>,
        <<"Basic YWxpY2Vfb3duZXJfY2FuX2xlYXZlX2Ffcm9vbV9hbmRfYXV0b19zZWxlY3Rfb3duZXJfMTgwMEBsb2NhbGhvc3Q6bWF0eWdyeXNh">>}],
      <<>>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 21 Mar 2024 07:48:54 GMT">>}],
         <<>>,80,59581}
Params: #{path =>
              <<"/api/rooms/1711-7335-85172/users/alice_owner_can_leave_a_room_and_auto_select_owner_1800@localhost">>,
          server => #{node => mongooseim@localhost},
          role => client,body => <<>>,method => <<"DELETE">>,
          creds =>
              {<<"alice_owner_can_leave_a_room_and_auto_select_owner_1800@localhost">>,
               <<"matygrysa">>},
          return_headers => true}


*** User 2024-03-21 07:48:55.174 ***🔗
bob_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1 in
<message from='1711-7335-85172@muclight.localhost' to='bob_owner_can_leave_a_room_and_auto_select_owner_1800@localhost' id='2253a415-8f92-4285-9617-5908bb11aa93' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<prev-version>1711-7335-103518</prev-version>
		<version>1711-7335-118080</version>
		<user affiliation='owner'>bob_owner_can_leave_a_room_and_auto_select_owner_1800@localhost</user>
		<user affiliation='none'>alice_owner_can_leave_a_room_and_auto_select_owner_1800@localhost</user>
	</x>
	<body/>
</message>



*** User 2024-03-21 07:48:55.174 ***🔗
bob_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1 out
</stream:stream>

*** User 2024-03-21 07:48:55.175 ***🔗
bob_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1 in
</stream:stream>

*** User 2024-03-21 07:48:55.175 ***🔗
alice_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1 out
</stream:stream>

*** User 2024-03-21 07:48:55.176 ***🔗
alice_owner_can_leave_a_room_and_auto_select_owner_1800@localhost/res1 in
</stream:stream>
*** CT 2024-03-21 07:48:55.185 *** View log from node mongooseim@localhost when finished🔗 mongooseim@localhost_4612.html



=== Ended at 2024-03-21 07:48:55
=== successfully completed test case
=== === Returned value: ok