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

=== Config value:

    [{watchdog,<0.9445.2>},
     {muc_light_host,<<"muclight.localhost">>},
     {mam_backend,rdbms},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/rest_client_SUITE_data"},
     {preset,"odbc_mssql_mnesia"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@43a5deef6262.2022-01-27_15.25.11/big_tests.tests.rest_client_SUITE.logs/run.2022-01-27_15.37.00/rest_client_suite.owner_can_leave_a_room_and_auto_select_owner.html"},
     {tc_group_properties,[{name,muc},{repeat_until_all_ok,3},pararell]},
     {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@43a5deef6262.2022-01-27_15.25.11/big_tests.tests.rest_client_SUITE.logs/run.2022-01-27_15.37.00/log_private/"},
     {{saved_modules,mongooseim@localhost,<<"localhost">>},
      #{mod_adhoc => [],mod_amp => [],mod_bosh => [],
        mod_cache_users => [{number_of_segments,5},{time_to_live,2}],
        mod_carboncopy => [],mod_commands => [],
        mod_disco => [{users_can_see_hidden_services,false}],
        mod_muc_commands => [],mod_muc_light_commands => [],
        mod_register =>
            [{access,register},
             {ip_access,[{allow,"127.0.0.0/8"},{deny,"0.0.0.0/0"}]},
             {welcome_message,{[],[]}}],
        mod_roster => [{backend,rdbms}],
        mod_sic => [],mod_stream_management => [],
        mod_vcard => [{backend,rdbms},{host,{prefix,<<"vjud.">>}}]}}]

=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@43a5deef6262.2022-01-27_15.25.11"

=== Started at 2022-01-27 15:37:01


*** CT 2022-01-27 15:37:01.467 *** View log from node mongooseim@localhost when started mongooseim@localhost_5807.html
*** CT 2022-01-27 15:37:01.468 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_2385.html

*** User 2022-01-27 15:37:01.475 ***
alicE_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-01-27 15:37:01.475 ***
alicE_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='f98543997d1dbdee' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-27 15:37:01.476 ***
alicE_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 in
<stream:features>
	<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
	<compression xmlns='http://jabber.org/features/compress'>
		<method>zlib</method>
	</compression>
	<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
		<mechanism>SCRAM-SHA-256</mechanism>
		<mechanism>PLAIN</mechanism>
	</mechanisms>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2022-01-27 15:37:01.476 ***
alicE_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX293bmVyX2Nhbl9sZWF2ZV9hX3Jvb21fYW5kX2F1dG9fc2VsZWN0X293bmVyXzIxNjIAbWF0eWdyeXNh</auth>



*** User 2022-01-27 15:37:01.477 ***
alicE_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-01-27 15:37:01.477 ***
alicE_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-01-27 15:37:01.477 ***
alicE_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='d3b1db9092945744' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-27 15:37:01.477 ***
alicE_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 in
<stream:features>
	<compression xmlns='http://jabber.org/features/compress'>
		<method>zlib</method>
	</compression>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2022-01-27 15:37:01.478 ***
alicE_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 out
<iq type='set' id='7953f530cc71e62e372b4ee25c280a85'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-01-27 15:37:01.478 ***
alicE_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 in
<iq id='7953f530cc71e62e372b4ee25c280a85' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alicE_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-01-27 15:37:01.478 ***
alicE_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 out
<iq type='set' id='920a1697e63c5caced388efd6e57b1c0'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:37:01.478 ***
alicE_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 in
<iq type='result' id='920a1697e63c5caced388efd6e57b1c0'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:37:01.478 ***
alicE_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 out
<presence/>



*** User 2022-01-27 15:37:01.480 ***
alicE_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 in
<presence from='alicE_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1' to='alice_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1' xml:lang='en'/>



*** User 2022-01-27 15:37:01.481 ***
bOb_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-01-27 15:37:01.481 ***
bOb_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='b1eab593584736ea' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-27 15:37:01.482 ***
bOb_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 in
<stream:features>
	<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
	<compression xmlns='http://jabber.org/features/compress'>
		<method>zlib</method>
	</compression>
	<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
		<mechanism>SCRAM-SHA-256</mechanism>
		<mechanism>PLAIN</mechanism>
	</mechanisms>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2022-01-27 15:37:01.482 ***
bOb_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9vd25lcl9jYW5fbGVhdmVfYV9yb29tX2FuZF9hdXRvX3NlbGVjdF9vd25lcl8yMTYyAG1ha3JvbGlrYQ==</auth>



*** User 2022-01-27 15:37:01.483 ***
bOb_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-01-27 15:37:01.483 ***
bOb_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-01-27 15:37:01.483 ***
bOb_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='59608d4401afc35a' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-27 15:37:01.484 ***
bOb_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 in
<stream:features>
	<compression xmlns='http://jabber.org/features/compress'>
		<method>zlib</method>
	</compression>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2022-01-27 15:37:01.484 ***
bOb_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 out
<iq type='set' id='1f4ad1a84ecde7d5c5c3224653b9db3c'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-01-27 15:37:01.484 ***
bOb_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 in
<iq id='1f4ad1a84ecde7d5c5c3224653b9db3c' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bOb_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-01-27 15:37:01.484 ***
bOb_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 out
<iq type='set' id='161a5bd75f79b5844e530891f9058e23'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:37:01.485 ***
bOb_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 in
<iq type='result' id='161a5bd75f79b5844e530891f9058e23'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:37:01.485 ***
bOb_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 out
<presence/>



*** User 2022-01-27 15:37:01.487 ***
bOb_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 in
<presence from='bOb_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1' to='bob_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1' xml:lang='en'/>



*** System report during rest_client_SUITE:owner_can_leave_a_room_and_auto_select_owner/1 in muc 2022-01-27 15:37:01.488 ***
=WARNING REPORT==== 27-Jan-2022::15:37:01.488917 ===
Description: "Authenticity is not established by certificate path validation"
     Reason: "Option {verify, verify_peer} and cacertfile/cacerts is missing"



*** User 2022-01-27 15:37:01.498 ***
REST request:
Code: 200
Req: {<0.9615.2>,<<"/api/rooms">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"97424fedbeb9bbbe">>},
       {<<"authorization">>,
        <<"Basic YWxpY2Vfb3duZXJfY2FuX2xlYXZlX2Ffcm9vbV9hbmRfYXV0b19zZWxlY3Rfb3duZXJfMjE2MkBsb2NhbGhvc3Q6bWF0eWdyeXNh">>}],
      <<"{\"subject\":\"This room subject\",\"name\":\"new_room_name\"}">>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 15:37:01 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"27">>}],
         <<"{\"id\":\"1643-297821-497859\"}">>,151,1643}
Params: #{body =>
              <<"{\"subject\":\"This room subject\",\"name\":\"new_room_name\"}">>,
          creds =>
              {<<"alice_owner_can_leave_a_room_and_auto_select_owner_2162@localhost">>,
               <<"matygrysa">>},
          method => <<"POST">>,path => <<"/api/rooms">>,
          return_headers => true,role => client,
          server => #{node => mongooseim@localhost}}


*** System report during rest_client_SUITE:owner_can_leave_a_room_and_auto_select_owner/1 in muc 2022-01-27 15:37:01.499 ***
=WARNING REPORT==== 27-Jan-2022::15:37:01.499333 ===
Description: "Authenticity is not established by certificate path validation"
     Reason: "Option {verify, verify_peer} and cacertfile/cacerts is missing"



*** User 2022-01-27 15:37:01.512 ***
REST request:
Code: 204
Req: {<0.9620.2>,<<"/api/rooms/1643-297821-497859/users">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"62d24f0a6345009d">>},
       {<<"authorization">>,
        <<"Basic YWxpY2Vfb3duZXJfY2FuX2xlYXZlX2Ffcm9vbV9hbmRfYXV0b19zZWxlY3Rfb3duZXJfMjE2MkBsb2NhbGhvc3Q6bWF0eWdyeXNh">>}],
      <<"{\"user\":\"bob_owner_can_leave_a_room_and_auto_select_owner_2162@localhost\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 15:37:01 GMT">>}],
         <<>>,80,6961}
Params: #{body =>
              <<"{\"user\":\"bob_owner_can_leave_a_room_and_auto_select_owner_2162@localhost\"}">>,
          creds =>
              {<<"alice_owner_can_leave_a_room_and_auto_select_owner_2162@localhost">>,
               <<"matygrysa">>},
          method => <<"POST">>,
          path => <<"/api/rooms/1643-297821-497859/users">>,
          return_headers => true,role => client,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 15:37:01.513 ***
bOb_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 in
<message from='1643-297821-497859@muclight.localhost' to='bob_owner_can_leave_a_room_and_auto_select_owner_2162@localhost' id='0b3efad5-6c84-40e2-a33b-5c0ceff2cfe9' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<version>1643-297821-507864</version>
		<user affiliation='member'>bob_owner_can_leave_a_room_and_auto_select_owner_2162@localhost</user>
	</x>
	<body/>
</message>



*** User 2022-01-27 15:37:01.513 ***
alicE_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 in
<message from='1643-297821-497859@muclight.localhost' to='alice_owner_can_leave_a_room_and_auto_select_owner_2162@localhost' id='0b3efad5-6c84-40e2-a33b-5c0ceff2cfe9' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<prev-version>1643-297821-497821</prev-version>
		<version>1643-297821-507864</version>
		<user affiliation='member'>bob_owner_can_leave_a_room_and_auto_select_owner_2162@localhost</user>
	</x>
	<body/>
	<stanza-id by='1643-297821-497859@muclight.localhost' id='BLKI2RKJSC81' xmlns='urn:xmpp:sid:0'/>
</message>



*** System report during rest_client_SUITE:owner_can_leave_a_room_and_auto_select_owner/1 in muc 2022-01-27 15:37:01.514 ***
=WARNING REPORT==== 27-Jan-2022::15:37:01.514658 ===
Description: "Authenticity is not established by certificate path validation"
     Reason: "Option {verify, verify_peer} and cacertfile/cacerts is missing"



*** User 2022-01-27 15:37:01.525 ***
REST request:
Code: 204
Req: {<0.9625.2>,
      <<"/api/rooms/1643-297821-497859/users/alice_owner_can_leave_a_room_and_auto_select_owner_2162@localhost">>,
      <<"DELETE">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"cdaf023fd12288da">>},
       {<<"authorization">>,
        <<"Basic YWxpY2Vfb3duZXJfY2FuX2xlYXZlX2Ffcm9vbV9hbmRfYXV0b19zZWxlY3Rfb3duZXJfMjE2MkBsb2NhbGhvc3Q6bWF0eWdyeXNh">>}],
      <<>>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 15:37:01 GMT">>}],
         <<>>,80,4532}
Params: #{body => <<>>,
          creds =>
              {<<"alice_owner_can_leave_a_room_and_auto_select_owner_2162@localhost">>,
               <<"matygrysa">>},
          method => <<"DELETE">>,
          path =>
              <<"/api/rooms/1643-297821-497859/users/alice_owner_can_leave_a_room_and_auto_select_owner_2162@localhost">>,
          return_headers => true,role => client,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 15:37:01.525 ***
bOb_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 in
<message from='1643-297821-497859@muclight.localhost' to='bob_owner_can_leave_a_room_and_auto_select_owner_2162@localhost' id='f68b7b93-a9ed-4ddb-bca8-c1714e46c961' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<prev-version>1643-297821-507864</prev-version>
		<version>1643-297821-522582</version>
		<user affiliation='owner'>bob_owner_can_leave_a_room_and_auto_select_owner_2162@localhost</user>
		<user affiliation='none'>alice_owner_can_leave_a_room_and_auto_select_owner_2162@localhost</user>
	</x>
	<body/>
	<stanza-id by='1643-297821-497859@muclight.localhost' id='BLKI2RKNGQ01' xmlns='urn:xmpp:sid:0'/>
</message>



*** User 2022-01-27 15:37:01.525 ***
bOb_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 out
</stream:stream>

*** User 2022-01-27 15:37:01.526 ***
bOb_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 in
</stream:stream>

*** User 2022-01-27 15:37:01.526 ***
alicE_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 out
</stream:stream>

*** User 2022-01-27 15:37:01.526 ***
alicE_owner_can_leave_a_room_and_auto_select_owner_2162@localhost/res1 in
</stream:stream>
*** CT 2022-01-27 15:37:01.528 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_2385.html
*** CT 2022-01-27 15:37:01.529 *** View log from node mongooseim@localhost when finished mongooseim@localhost_5807.html



=== Ended at 2022-01-27 15:37:01
=== successfully completed test case
=== === Returned value: ok


Test run history | Top level test index | Latest test result