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

=== Config value:

    [{watchdog,<0.85859.0>},
     {muc_light_host,<<"muclight.localhost">>},
     {mam_backend,rdbms},
     {preset,"odbc_mssql_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@fb43d4252d17.2024-02-22_12.37.44/big_tests.tests.rest_client_SUITE.logs/run.2024-02-22_12.55.57/rest_client_suite.owner_can_leave_a_room_and_auto_select_owner.103044.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@fb43d4252d17.2024-02-22_12.37.44/big_tests.tests.rest_client_SUITE.logs/run.2024-02-22_12.55.57/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_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_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@fb43d4252d17.2024-02-22_12.37.44"

=== Started at 2024-02-22 12:55:58


*** CT 2024-02-22 12:55:58.301 *** View log from node mongooseim@localhost when started🔗 mongooseim@localhost_4698.html

*** User 2024-02-22 12:55:58.394 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_3259@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-02-22 12:55:58.395 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='23647b8e5b63b469' from='localhost' version='1.0' xml:lang='en'>

*** User 2024-02-22 12:55:58.396 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_3259@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-02-22 12:55:58.397 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX293bmVyX2Nhbl9sZWF2ZV9hX3Jvb21fYW5kX2F1dG9fc2VsZWN0X293bmVyXzMyNTkAbWF0eWdyeXNh</auth>



*** User 2024-02-22 12:55:58.398 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2024-02-22 12:55:58.398 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_3259@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-02-22 12:55:58.399 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='985b45ede775d9e7' from='localhost' version='1.0' xml:lang='en' to='alice_owner_can_leave_a_room_and_auto_select_owner_3259@localhost'>

*** User 2024-02-22 12:55:58.399 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_3259@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-02-22 12:55:58.400 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1 out
<iq type='set' id='0e1c9bb9ea69e0fc6509d15cb30e01c5'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2024-02-22 12:55:58.401 ***🔗
alicE_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1 in
<iq id='0e1c9bb9ea69e0fc6509d15cb30e01c5' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alice_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1</jid>
	</bind>
</iq>



*** User 2024-02-22 12:55:58.402 ***🔗
alice_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1 out
<iq type='set' id='0738d3d7a9f89f917ddf133c60947921'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-02-22 12:55:58.403 ***🔗
alice_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1 in
<iq from='localhost' to='alice_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1' id='0738d3d7a9f89f917ddf133c60947921' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-02-22 12:55:58.408 ***🔗
alice_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1 out
<presence/>



*** User 2024-02-22 12:55:58.469 ***🔗
alice_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1 in
<presence from='alice_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1' to='alice_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1'/>



*** User 2024-02-22 12:55:58.470 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_3259@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-02-22 12:55:58.471 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='1f78fc2feb528573' from='localhost' version='1.0' xml:lang='en'>

*** User 2024-02-22 12:55:58.471 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_3259@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-02-22 12:55:58.471 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9vd25lcl9jYW5fbGVhdmVfYV9yb29tX2FuZF9hdXRvX3NlbGVjdF9vd25lcl8zMjU5AG1ha3JvbGlrYQ==</auth>



*** User 2024-02-22 12:55:58.475 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2024-02-22 12:55:58.475 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_3259@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-02-22 12:55:58.476 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='0e0dfd3170f1805e' from='localhost' version='1.0' xml:lang='en' to='bob_owner_can_leave_a_room_and_auto_select_owner_3259@localhost'>

*** User 2024-02-22 12:55:58.476 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_3259@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-02-22 12:55:58.477 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1 out
<iq type='set' id='86ed2ed62c1c52728cec08cf16638f55'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2024-02-22 12:55:58.477 ***🔗
bOb_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1 in
<iq id='86ed2ed62c1c52728cec08cf16638f55' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bob_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1</jid>
	</bind>
</iq>



*** User 2024-02-22 12:55:58.478 ***🔗
bob_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1 out
<iq type='set' id='8d499f379ae6991c87c5f14f8fbe9874'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-02-22 12:55:58.481 ***🔗
bob_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1 in
<iq from='localhost' to='bob_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1' id='8d499f379ae6991c87c5f14f8fbe9874' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-02-22 12:55:58.482 ***🔗
bob_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1 out
<presence/>



*** User 2024-02-22 12:55:58.486 ***🔗
bob_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1 in
<presence from='bob_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1' to='bob_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1'/>



*** User 2024-02-22 12:55:58.592 ***🔗
REST request:
Code: 201
Req: {<0.86273.0>,<<"/api/rooms">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"99ef37df388d9bec">>},
       {<<"authorization">>,
        <<"Basic YWxpY2Vfb3duZXJfY2FuX2xlYXZlX2Ffcm9vbV9hbmRfYXV0b19zZWxlY3Rfb3duZXJfMzI1OUBsb2NhbGhvc3Q6bWF0eWdyeXNh">>}],
      <<"{\"subject\":\"This room subject\",\"name\":\"new_room_name\"}">>}
Result: {{<<"201">>,<<"Created">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 22 Feb 2024 12:55:57 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"27">>}],
         <<"{\"id\":\"1708-606558-573658\"}">>,156,94996}
Params: #{path => <<"/api/rooms">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,
          creds =>
              {<<"alice_owner_can_leave_a_room_and_auto_select_owner_3259@localhost">>,
               <<"matygrysa">>},
          role => client,
          body =>
              <<"{\"subject\":\"This room subject\",\"name\":\"new_room_name\"}">>,
          return_headers => true}


*** User 2024-02-22 12:55:58.790 ***🔗
REST request:
Code: 204
Req: {<0.86424.0>,<<"/api/rooms/1708-606558-573658/users">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"59ebd254b7a98a74">>},
       {<<"authorization">>,
        <<"Basic YWxpY2Vfb3duZXJfY2FuX2xlYXZlX2Ffcm9vbV9hbmRfYXV0b19zZWxlY3Rfb3duZXJfMzI1OUBsb2NhbGhvc3Q6bWF0eWdyeXNh">>}],
      <<"{\"user\":\"bob_owner_can_leave_a_room_and_auto_select_owner_3259@localhost\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 22 Feb 2024 12:55:57 GMT">>}],
         <<>>,80,190322}
Params: #{path => <<"/api/rooms/1708-606558-573658/users">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,
          creds =>
              {<<"alice_owner_can_leave_a_room_and_auto_select_owner_3259@localhost">>,
               <<"matygrysa">>},
          role => client,
          body =>
              <<"{\"user\":\"bob_owner_can_leave_a_room_and_auto_select_owner_3259@localhost\"}">>,
          return_headers => true}


*** User 2024-02-22 12:55:58.791 ***🔗
bob_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1 in
<message from='1708-606558-573658@muclight.localhost' to='bob_owner_can_leave_a_room_and_auto_select_owner_3259@localhost' id='1df77432-69ea-43b5-9041-466a68f7a444' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<version>1708-606558-777149</version>
		<user affiliation='member'>bob_owner_can_leave_a_room_and_auto_select_owner_3259@localhost</user>
	</x>
	<body/>
</message>



*** User 2024-02-22 12:55:58.791 ***🔗
alice_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1 in
<message from='1708-606558-573658@muclight.localhost' to='alice_owner_can_leave_a_room_and_auto_select_owner_3259@localhost' id='1df77432-69ea-43b5-9041-466a68f7a444' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<prev-version>1708-606558-573644</prev-version>
		<version>1708-606558-777149</version>
		<user affiliation='member'>bob_owner_can_leave_a_room_and_auto_select_owner_3259@localhost</user>
	</x>
	<body/>
	<stanza-id by='1708-606558-573658@muclight.localhost' id='C4FNURVJEM81' xmlns='urn:xmpp:sid:0'/>
</message>



*** User 2024-02-22 12:55:58.883 ***🔗
REST request:
Code: 204
Req: {<0.86665.0>,
      <<"/api/rooms/1708-606558-573658/users/alice_owner_can_leave_a_room_and_auto_select_owner_3259@localhost">>,
      <<"DELETE">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"3a12736463aae49c">>},
       {<<"authorization">>,
        <<"Basic YWxpY2Vfb3duZXJfY2FuX2xlYXZlX2Ffcm9vbV9hbmRfYXV0b19zZWxlY3Rfb3duZXJfMzI1OUBsb2NhbGhvc3Q6bWF0eWdyeXNh">>}],
      <<>>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 22 Feb 2024 12:55:57 GMT">>}],
         <<>>,80,17045}
Params: #{path =>
              <<"/api/rooms/1708-606558-573658/users/alice_owner_can_leave_a_room_and_auto_select_owner_3259@localhost">>,
          server => #{node => mongooseim@localhost},
          method => <<"DELETE">>,
          creds =>
              {<<"alice_owner_can_leave_a_room_and_auto_select_owner_3259@localhost">>,
               <<"matygrysa">>},
          role => client,body => <<>>,return_headers => true}


*** User 2024-02-22 12:55:58.883 ***🔗
bob_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1 in
<message from='1708-606558-573658@muclight.localhost' to='bob_owner_can_leave_a_room_and_auto_select_owner_3259@localhost' id='f1ec4e07-f70c-4438-bc43-cbad990b35c9' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<prev-version>1708-606558-777149</prev-version>
		<version>1708-606558-872018</version>
		<user affiliation='owner'>bob_owner_can_leave_a_room_and_auto_select_owner_3259@localhost</user>
		<user affiliation='none'>alice_owner_can_leave_a_room_and_auto_select_owner_3259@localhost</user>
	</x>
	<body/>
	<stanza-id by='1708-606558-573658@muclight.localhost' id='C4FNUS096QO1' xmlns='urn:xmpp:sid:0'/>
</message>



*** User 2024-02-22 12:55:58.883 ***🔗
bob_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1 out
</stream:stream>

*** User 2024-02-22 12:55:58.883 ***🔗
bob_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1 in
</stream:stream>

*** User 2024-02-22 12:55:58.884 ***🔗
alice_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1 out
</stream:stream>

*** User 2024-02-22 12:55:58.884 ***🔗
alice_owner_can_leave_a_room_and_auto_select_owner_3259@localhost/res1 in
</stream:stream>
*** CT 2024-02-22 12:55:58.898 *** View log from node mongooseim@localhost when finished🔗 mongooseim@localhost_4698.html



=== Ended at 2024-02-22 12:55:58
=== successfully completed test case
=== === Returned value: ok