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

=== Config value:

    [{watchdog,<0.55131.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@96c6ee1c58e0.2024-03-08_08.34.24/big_tests.tests.rest_client_SUITE.logs/run.2024-03-08_08.47.46/rest_client_suite.owner_can_leave_a_room_and_auto_select_owner.37380.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@96c6ee1c58e0.2024-03-08_08.34.24/big_tests.tests.rest_client_SUITE.logs/run.2024-03-08_08.47.46/log_private/"},
     {{saved_modules,mongooseim@localhost,<<"localhost">>},
      #{mod_vcard =>
            #{matches => 30,
              host => {prefix,<<"vjud.">>},
              search => true,backend => mnesia,iqdisc => parallel},
        mod_roster =>
            #{backend => mnesia,iqdisc => one_queue,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,
              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@96c6ee1c58e0.2024-03-08_08.34.24"

=== Started at 2024-03-08 08:47:47


*** CT 2024-03-08 08:47:47.216 *** View log from node mongooseim@localhost when started🔗 mongooseim@localhost_4588.html

*** User 2024-03-08 08:47:47.241 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_1789@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-08 08:47:47.241 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='7d345a7a87629a26' from='localhost' version='1.0' xml:lang='en'>

*** User 2024-03-08 08:47:47.241 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_1789@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-08 08:47:47.242 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX293bmVyX2Nhbl9sZWF2ZV9hX3Jvb21fYW5kX2F1dG9fc2VsZWN0X293bmVyXzE3ODkAbWF0eWdyeXNh</auth>



*** User 2024-03-08 08:47:47.243 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2024-03-08 08:47:47.243 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_1789@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-08 08:47:47.244 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='4ae76def801f0527' from='localhost' version='1.0' xml:lang='en' to='alice_owner_can_leave_a_room_and_auto_select_owner_1789@localhost'>

*** User 2024-03-08 08:47:47.244 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_1789@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-08 08:47:47.244 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1 out
<iq type='set' id='6492eec2ba7aa8cf173f7d68bc1b31c5'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2024-03-08 08:47:47.245 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1 in
<iq id='6492eec2ba7aa8cf173f7d68bc1b31c5' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alice_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1</jid>
	</bind>
</iq>



*** User 2024-03-08 08:47:47.245 ***🔗
alice_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1 out
<iq type='set' id='c7cd0e4fe4ae87b5013436a1c7d78fef'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-03-08 08:47:47.245 ***🔗
alice_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1 in
<iq from='localhost' to='alice_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1' id='c7cd0e4fe4ae87b5013436a1c7d78fef' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-03-08 08:47:47.246 ***🔗
alice_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1 out
<presence/>



*** User 2024-03-08 08:47:47.247 ***🔗
alice_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1 in
<presence from='alice_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1' to='alice_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1'/>



*** User 2024-03-08 08:47:47.249 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_1789@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-08 08:47:47.282 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='1ec717fbe6cddf96' from='localhost' version='1.0' xml:lang='en'>

*** User 2024-03-08 08:47:47.282 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_1789@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-08 08:47:47.282 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9vd25lcl9jYW5fbGVhdmVfYV9yb29tX2FuZF9hdXRvX3NlbGVjdF9vd25lcl8xNzg5AG1ha3JvbGlrYQ==</auth>



*** User 2024-03-08 08:47:47.284 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2024-03-08 08:47:47.284 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_1789@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-08 08:47:47.285 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='c18a4f5dbc704ed3' from='localhost' version='1.0' xml:lang='en' to='bob_owner_can_leave_a_room_and_auto_select_owner_1789@localhost'>

*** User 2024-03-08 08:47:47.285 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_1789@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-08 08:47:47.286 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1 out
<iq type='set' id='32f8ca0d54400ae10ed7ad4ec3311eb5'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2024-03-08 08:47:47.287 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1 in
<iq id='32f8ca0d54400ae10ed7ad4ec3311eb5' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bob_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1</jid>
	</bind>
</iq>



*** User 2024-03-08 08:47:47.287 ***🔗
bob_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1 out
<iq type='set' id='781c42f8995c7a1d95df03c31b8f2faf'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-03-08 08:47:47.288 ***🔗
bob_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1 in
<iq from='localhost' to='bob_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1' id='781c42f8995c7a1d95df03c31b8f2faf' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-03-08 08:47:47.288 ***🔗
bob_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1 out
<presence/>



*** User 2024-03-08 08:47:47.289 ***🔗
bob_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1 in
<presence from='bob_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1' to='bob_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1'/>



*** User 2024-03-08 08:47:47.301 ***🔗
REST request:
Code: 201
Req: {<0.55519.0>,<<"/api/rooms">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"b34df811a0de78e8">>},
       {<<"authorization">>,
        <<"Basic YWxpY2Vfb3duZXJfY2FuX2xlYXZlX2Ffcm9vbV9hbmRfYXV0b19zZWxlY3Rfb3duZXJfMTc4OUBsb2NhbGhvc3Q6bWF0eWdyeXNh">>}],
      <<"{\"subject\":\"This room subject\",\"name\":\"new_room_name\"}">>}
Result: {{<<"201">>,<<"Created">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Fri, 08 Mar 2024 08:47:47 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"27">>}],
         <<"{\"id\":\"1709-887667-300317\"}">>,156,2129}
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_1789@localhost">>,
               <<"matygrysa">>},
          return_headers => true}


*** User 2024-03-08 08:47:47.311 ***🔗
REST request:
Code: 204
Req: {<0.55606.0>,<<"/api/rooms/1709-887667-300317/users">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"7653bdf78aa04f0a">>},
       {<<"authorization">>,
        <<"Basic YWxpY2Vfb3duZXJfY2FuX2xlYXZlX2Ffcm9vbV9hbmRfYXV0b19zZWxlY3Rfb3duZXJfMTc4OUBsb2NhbGhvc3Q6bWF0eWdyeXNh">>}],
      <<"{\"user\":\"bob_owner_can_leave_a_room_and_auto_select_owner_1789@localhost\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Fri, 08 Mar 2024 08:47:47 GMT">>}],
         <<>>,80,993}
Params: #{path => <<"/api/rooms/1709-887667-300317/users">>,
          server => #{node => mongooseim@localhost},
          role => client,
          body =>
              <<"{\"user\":\"bob_owner_can_leave_a_room_and_auto_select_owner_1789@localhost\"}">>,
          method => <<"POST">>,
          creds =>
              {<<"alice_owner_can_leave_a_room_and_auto_select_owner_1789@localhost">>,
               <<"matygrysa">>},
          return_headers => true}


*** User 2024-03-08 08:47:47.312 ***🔗
bob_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1 in
<message from='1709-887667-300317@muclight.localhost' to='bob_owner_can_leave_a_room_and_auto_select_owner_1789@localhost' id='deaaba32-82c8-4534-8a2f-d366bd4f5de7' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<version>1709-887667-310639</version>
		<user affiliation='member'>bob_owner_can_leave_a_room_and_auto_select_owner_1789@localhost</user>
	</x>
	<body/>
</message>



*** User 2024-03-08 08:47:47.312 ***🔗
alice_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1 in
<message from='1709-887667-300317@muclight.localhost' to='alice_owner_can_leave_a_room_and_auto_select_owner_1789@localhost' id='deaaba32-82c8-4534-8a2f-d366bd4f5de7' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<prev-version>1709-887667-300097</prev-version>
		<version>1709-887667-310639</version>
		<user affiliation='member'>bob_owner_can_leave_a_room_and_auto_select_owner_1789@localhost</user>
	</x>
	<body/>
</message>



*** User 2024-03-08 08:47:47.321 ***🔗
REST request:
Code: 204
Req: {<0.55692.0>,
      <<"/api/rooms/1709-887667-300317/users/alice_owner_can_leave_a_room_and_auto_select_owner_1789@localhost">>,
      <<"DELETE">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"986cd905608b53a3">>},
       {<<"authorization">>,
        <<"Basic YWxpY2Vfb3duZXJfY2FuX2xlYXZlX2Ffcm9vbV9hbmRfYXV0b19zZWxlY3Rfb3duZXJfMTc4OUBsb2NhbGhvc3Q6bWF0eWdyeXNh">>}],
      <<>>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Fri, 08 Mar 2024 08:47:47 GMT">>}],
         <<>>,80,905}
Params: #{path =>
              <<"/api/rooms/1709-887667-300317/users/alice_owner_can_leave_a_room_and_auto_select_owner_1789@localhost">>,
          server => #{node => mongooseim@localhost},
          role => client,body => <<>>,method => <<"DELETE">>,
          creds =>
              {<<"alice_owner_can_leave_a_room_and_auto_select_owner_1789@localhost">>,
               <<"matygrysa">>},
          return_headers => true}


*** User 2024-03-08 08:47:47.321 ***🔗
bob_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1 in
<message from='1709-887667-300317@muclight.localhost' to='bob_owner_can_leave_a_room_and_auto_select_owner_1789@localhost' id='8caf2248-8b68-4b9e-949f-9bee45ef5fc0' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<prev-version>1709-887667-310639</prev-version>
		<version>1709-887667-320868</version>
		<user affiliation='owner'>bob_owner_can_leave_a_room_and_auto_select_owner_1789@localhost</user>
		<user affiliation='none'>alice_owner_can_leave_a_room_and_auto_select_owner_1789@localhost</user>
	</x>
	<body/>
</message>



*** User 2024-03-08 08:47:47.321 ***🔗
bob_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1 out
</stream:stream>

*** User 2024-03-08 08:47:47.322 ***🔗
bob_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1 in
</stream:stream>

*** User 2024-03-08 08:47:47.323 ***🔗
alice_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1 out
</stream:stream>

*** User 2024-03-08 08:47:47.380 ***🔗
alice_owner_can_leave_a_room_and_auto_select_owner_1789@localhost/res1 in
</stream:stream>
*** CT 2024-03-08 08:47:47.384 *** View log from node mongooseim@localhost when finished🔗 mongooseim@localhost_4588.html



=== Ended at 2024-03-08 08:47:47
=== successfully completed test case
=== === Returned value: ok