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

=== Config value:

    [{watchdog,<0.22477.2>},
     {muc_light_host,<<"muclight.localhost">>},
     {mam_backend,rdbms},
     {preset,"pgsql_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@7e4977dadadb.2024-04-25_07.08.11/big_tests.tests.rest_client_SUITE.logs/run.2024-04-25_07.24.28/rest_client_suite.owner_can_leave_a_room_and_auto_select_owner.251522.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@7e4977dadadb.2024-04-25_07.08.11/big_tests.tests.rest_client_SUITE.logs/run.2024-04-25_07.24.28/log_private/"},
     {{saved_modules,mongooseim@localhost,<<"localhost">>},
      #{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,strategy => fifo,time_to_live => 2},
        mod_carboncopy => #{iqdisc => no_queue},
        mod_disco =>
            #{extra_domains => [],iqdisc => one_queue,server_info => [],
              users_can_see_hidden_services => false},
        mod_presence => #{},
        mod_register =>
            #{access => register,
              ip_access => [{allow,"127.0.0.0/8"},{deny,"0.0.0.0/0"}],
              iqdisc => one_queue,password_strength => 0,
              registration_watchers => []},
        mod_roster =>
            #{backend => rdbms,iqdisc => one_queue,store_current_id => false,
              versioning => false},
        mod_sic => #{iqdisc => one_queue},
        mod_stream_management =>
            #{ack => true,ack_freq => 1,backend => mnesia,buffer => true,
              buffer_max => 100,resume_timeout => 600,
              stale_h =>
                  #{enabled => false,geriatric => 3600,repeat_after => 1800}},
        mod_vcard =>
            #{backend => rdbms,
              host => {prefix,<<"vjud.">>},
              iqdisc => parallel,matches => 30,search => true}}}]

=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@7e4977dadadb.2024-04-25_07.08.11"

=== Started at 2024-04-25 07:24:29


*** CT 2024-04-25 07:24:29.381 *** View log from node mongooseim@localhost when started🔗 mongooseim@localhost_4910.html

*** User 2024-04-25 07:24:29.480 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_3356@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-25 07:24:29.481 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='98ceaf2380fd7cc2' from='localhost' version='1.0' xml:lang='en'>

*** User 2024-04-25 07:24:29.482 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_3356@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-25 07:24:29.483 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX293bmVyX2Nhbl9sZWF2ZV9hX3Jvb21fYW5kX2F1dG9fc2VsZWN0X293bmVyXzMzNTYAbWF0eWdyeXNh</auth>



*** User 2024-04-25 07:24:29.484 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2024-04-25 07:24:29.485 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_3356@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-25 07:24:29.485 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='077de48cbb27af7c' from='localhost' version='1.0' xml:lang='en' to='alice_owner_can_leave_a_room_and_auto_select_owner_3356@localhost'>

*** User 2024-04-25 07:24:29.489 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_3356@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-25 07:24:29.490 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1 out
<iq type='set' id='1595088eb6fc9ed1bf2d9c61aff0ccab'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2024-04-25 07:24:29.491 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1 in
<iq id='1595088eb6fc9ed1bf2d9c61aff0ccab' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alice_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1</jid>
	</bind>
</iq>



*** User 2024-04-25 07:24:29.492 ***🔗
alice_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1 out
<iq type='set' id='ae1b4f6d11bfc39c088cb15e63927062'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-25 07:24:29.494 ***🔗
alice_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1 in
<iq from='localhost' to='alice_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1' id='ae1b4f6d11bfc39c088cb15e63927062' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-25 07:24:29.495 ***🔗
alice_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1 out
<presence/>



*** User 2024-04-25 07:24:29.512 ***🔗
alice_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1 in
<presence from='alice_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1' to='alice_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1'/>



*** User 2024-04-25 07:24:29.521 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_3356@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-25 07:24:29.524 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='f549bd72e3acd8d1' from='localhost' version='1.0' xml:lang='en'>

*** User 2024-04-25 07:24:29.525 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_3356@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-25 07:24:29.526 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9vd25lcl9jYW5fbGVhdmVfYV9yb29tX2FuZF9hdXRvX3NlbGVjdF9vd25lcl8zMzU2AG1ha3JvbGlrYQ==</auth>



*** User 2024-04-25 07:24:29.529 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2024-04-25 07:24:29.529 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_3356@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-25 07:24:29.529 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='d1c0fcd000d1a387' from='localhost' version='1.0' xml:lang='en' to='bob_owner_can_leave_a_room_and_auto_select_owner_3356@localhost'>

*** User 2024-04-25 07:24:29.529 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_3356@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-25 07:24:29.530 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1 out
<iq type='set' id='206a5f9dec06919a60ad1aeabd5ca73e'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2024-04-25 07:24:29.531 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1 in
<iq id='206a5f9dec06919a60ad1aeabd5ca73e' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bob_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1</jid>
	</bind>
</iq>



*** User 2024-04-25 07:24:29.531 ***🔗
bob_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1 out
<iq type='set' id='eb4a67ab15d0e00791039d2a8c7a678f'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-25 07:24:29.532 ***🔗
bob_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1 in
<iq from='localhost' to='bob_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1' id='eb4a67ab15d0e00791039d2a8c7a678f' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-25 07:24:29.533 ***🔗
bob_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1 out
<presence/>



*** User 2024-04-25 07:24:29.578 ***🔗
bob_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1 in
<presence from='bob_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1' to='bob_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1'/>



*** User 2024-04-25 07:24:29.661 ***🔗
REST request:
Code: 201
Req: {<0.22885.2>,<<"/api/rooms">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"30a394e1f099d034">>},
       {<<"authorization">>,
        <<"Basic YWxpY2Vfb3duZXJfY2FuX2xlYXZlX2Ffcm9vbV9hbmRfYXV0b19zZWxlY3Rfb3duZXJfMzM1NkBsb2NhbGhvc3Q6bWF0eWdyeXNh">>}],
      <<"{\"subject\":\"This room subject\",\"name\":\"new_room_name\"}">>}
Result: {{<<"201">>,<<"Created">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 25 Apr 2024 07:24:28 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"26">>}],
         <<"{\"id\":\"1714-29869-614556\"}">>,155,57744}
Params: #{body =>
              <<"{\"subject\":\"This room subject\",\"name\":\"new_room_name\"}">>,
          creds =>
              {<<"alice_owner_can_leave_a_room_and_auto_select_owner_3356@localhost">>,
               <<"matygrysa">>},
          method => <<"POST">>,path => <<"/api/rooms">>,
          return_headers => true,role => client,
          server => #{node => mongooseim@localhost}}


*** User 2024-04-25 07:24:29.726 ***🔗
REST request:
Code: 204
Req: {<0.22988.2>,<<"/api/rooms/1714-29869-614556/users">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"b5992d0fff2007c3">>},
       {<<"authorization">>,
        <<"Basic YWxpY2Vfb3duZXJfY2FuX2xlYXZlX2Ffcm9vbV9hbmRfYXV0b19zZWxlY3Rfb3duZXJfMzM1NkBsb2NhbGhvc3Q6bWF0eWdyeXNh">>}],
      <<"{\"user\":\"bob_owner_can_leave_a_room_and_auto_select_owner_3356@localhost\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 25 Apr 2024 07:24:28 GMT">>}],
         <<>>,80,45685}
Params: #{body =>
              <<"{\"user\":\"bob_owner_can_leave_a_room_and_auto_select_owner_3356@localhost\"}">>,
          creds =>
              {<<"alice_owner_can_leave_a_room_and_auto_select_owner_3356@localhost">>,
               <<"matygrysa">>},
          method => <<"POST">>,
          path => <<"/api/rooms/1714-29869-614556/users">>,
          return_headers => true,role => client,
          server => #{node => mongooseim@localhost}}


*** User 2024-04-25 07:24:29.727 ***🔗
bob_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1 in
<message from='1714-29869-614556@muclight.localhost' to='bob_owner_can_leave_a_room_and_auto_select_owner_3356@localhost' id='941c6b3d-8df8-4bb9-a65e-4bd8b9a0f8eb' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<version>1714-29869-705242</version>
		<user affiliation='member'>bob_owner_can_leave_a_room_and_auto_select_owner_3356@localhost</user>
	</x>
	<body/>
</message>



*** User 2024-04-25 07:24:29.727 ***🔗
alice_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1 in
<message from='1714-29869-614556@muclight.localhost' to='alice_owner_can_leave_a_room_and_auto_select_owner_3356@localhost' id='941c6b3d-8df8-4bb9-a65e-4bd8b9a0f8eb' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<prev-version>1714-29869-614540</prev-version>
		<version>1714-29869-705242</version>
		<user affiliation='member'>bob_owner_can_leave_a_room_and_auto_select_owner_3356@localhost</user>
	</x>
	<body/>
	<stanza-id by='1714-29869-614556@muclight.localhost' id='C5N6LM284G81' xmlns='urn:xmpp:sid:0'/>
</message>



*** User 2024-04-25 07:24:29.802 ***🔗
REST request:
Code: 204
Req: {<0.23141.2>,
      <<"/api/rooms/1714-29869-614556/users/alice_owner_can_leave_a_room_and_auto_select_owner_3356@localhost">>,
      <<"DELETE">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"30ccc71a0e696560">>},
       {<<"authorization">>,
        <<"Basic YWxpY2Vfb3duZXJfY2FuX2xlYXZlX2Ffcm9vbV9hbmRfYXV0b19zZWxlY3Rfb3duZXJfMzM1NkBsb2NhbGhvc3Q6bWF0eWdyeXNh">>}],
      <<>>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 25 Apr 2024 07:24:28 GMT">>}],
         <<>>,80,27364}
Params: #{body => <<>>,
          creds =>
              {<<"alice_owner_can_leave_a_room_and_auto_select_owner_3356@localhost">>,
               <<"matygrysa">>},
          method => <<"DELETE">>,
          path =>
              <<"/api/rooms/1714-29869-614556/users/alice_owner_can_leave_a_room_and_auto_select_owner_3356@localhost">>,
          return_headers => true,role => client,
          server => #{node => mongooseim@localhost}}


*** User 2024-04-25 07:24:29.802 ***🔗
bob_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1 in
<message from='1714-29869-614556@muclight.localhost' to='bob_owner_can_leave_a_room_and_auto_select_owner_3356@localhost' id='03c29ce1-36b0-4275-b0ee-d5e9ea9966a4' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<prev-version>1714-29869-705242</prev-version>
		<version>1714-29869-788745</version>
		<user affiliation='owner'>bob_owner_can_leave_a_room_and_auto_select_owner_3356@localhost</user>
		<user affiliation='none'>alice_owner_can_leave_a_room_and_auto_select_owner_3356@localhost</user>
	</x>
	<body/>
	<stanza-id by='1714-29869-614556@muclight.localhost' id='C5N6LM2T4D81' xmlns='urn:xmpp:sid:0'/>
</message>



*** User 2024-04-25 07:24:29.802 ***🔗
bob_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1 out
</stream:stream>

*** User 2024-04-25 07:24:29.805 ***🔗
bob_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1 in
</stream:stream>

*** User 2024-04-25 07:24:29.806 ***🔗
alice_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1 out
</stream:stream>

*** User 2024-04-25 07:24:29.808 ***🔗
alice_owner_can_leave_a_room_and_auto_select_owner_3356@localhost/res1 in
</stream:stream>
*** CT 2024-04-25 07:24:29.821 *** View log from node mongooseim@localhost when finished🔗 mongooseim@localhost_4910.html



=== Ended at 2024-04-25 07:24:29
=== successfully completed test case
=== === Returned value: ok