=== Test case: muc_light_http_api_SUITE:delete_room_by_non_owner/1 (click for source code)

=== Config value:

    [{watchdog,<0.29102.1>},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/muc_light_http_api_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.muc_light_http_api_SUITE.logs/run.2022-01-27_15.34.18/muc_light_http_api_suite.delete_room_by_non_owner.125698.html"},
     {tc_group_properties,[{name,negative},parallel]},
     {tc_group_path,[]},
     {data_dir,"/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/muc_light_http_api_SUITE_data/"},
     {priv_dir,"/home/circleci/project/big_tests/ct_report/ct_run.test@43a5deef6262.2022-01-27_15.25.11/big_tests.tests.muc_light_http_api_SUITE.logs/run.2022-01-27_15.34.18/log_private/"},
     {escalus_users,[{alice,[{username,<<"alicE">>},
                             {server,<<"localhost">>},
                             {password,<<"matygrysa">>}]},
                     {bob,[{username,<<"bOb">>},
                           {server,<<"localhost">>},
                           {password,<<"makrolika">>}]},
                     {kate,[{username,<<"kate">>},
                            {server,<<"localhost">>},
                            {password,<<"makrowe;p">>}]}]}]

=== 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:34:18


*** CT 2022-01-27 15:34:18.457 *** View log from node mongooseim@localhost when started mongooseim@localhost_5385.html
*** CT 2022-01-27 15:34:18.458 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_2348.html

*** User 2022-01-27 15:34:18.475 ***
alicE_delete_room_by_non_owner_1793@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:34:18.475 ***
alicE_delete_room_by_non_owner_1793@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='4043157278cca729' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-27 15:34:18.475 ***
alicE_delete_room_by_non_owner_1793@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:34:18.475 ***
alicE_delete_room_by_non_owner_1793@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX2RlbGV0ZV9yb29tX2J5X25vbl9vd25lcl8xNzkzAG1hdHlncnlzYQ==</auth>



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



*** User 2022-01-27 15:34:18.476 ***
alicE_delete_room_by_non_owner_1793@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:34:18.477 ***
alicE_delete_room_by_non_owner_1793@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='18107286e93a7ba4' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-27 15:34:18.477 ***
alicE_delete_room_by_non_owner_1793@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:34:18.477 ***
alicE_delete_room_by_non_owner_1793@localhost/res1 out
<iq type='set' id='95574eeb0f1c5216c69f6cb4e3efc774'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-01-27 15:34:18.477 ***
alicE_delete_room_by_non_owner_1793@localhost/res1 in
<iq id='95574eeb0f1c5216c69f6cb4e3efc774' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alicE_delete_room_by_non_owner_1793@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-01-27 15:34:18.477 ***
alicE_delete_room_by_non_owner_1793@localhost/res1 out
<iq type='set' id='1422ba2a2a2112d75e283d01d90b79b6'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:34:18.477 ***
alicE_delete_room_by_non_owner_1793@localhost/res1 in
<iq type='result' id='1422ba2a2a2112d75e283d01d90b79b6'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:34:18.478 ***
alicE_delete_room_by_non_owner_1793@localhost/res1 out
<presence/>



*** User 2022-01-27 15:34:18.482 ***
alicE_delete_room_by_non_owner_1793@localhost/res1 in
<presence from='alicE_delete_room_by_non_owner_1793@localhost/res1' to='alice_delete_room_by_non_owner_1793@localhost/res1' xml:lang='en'/>



*** User 2022-01-27 15:34:18.483 ***
bOb_delete_room_by_non_owner_1793@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:34:18.483 ***
bOb_delete_room_by_non_owner_1793@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='3bf09ca70d72b2fa' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-27 15:34:18.484 ***
bOb_delete_room_by_non_owner_1793@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:34:18.484 ***
bOb_delete_room_by_non_owner_1793@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9kZWxldGVfcm9vbV9ieV9ub25fb3duZXJfMTc5MwBtYWtyb2xpa2E=</auth>



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



*** User 2022-01-27 15:34:18.485 ***
bOb_delete_room_by_non_owner_1793@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:34:18.485 ***
bOb_delete_room_by_non_owner_1793@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='47da9d3c1ae269b3' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-27 15:34:18.485 ***
bOb_delete_room_by_non_owner_1793@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:34:18.485 ***
bOb_delete_room_by_non_owner_1793@localhost/res1 out
<iq type='set' id='ec02b711ed7df80674598f79363db302'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-01-27 15:34:18.485 ***
bOb_delete_room_by_non_owner_1793@localhost/res1 in
<iq id='ec02b711ed7df80674598f79363db302' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bOb_delete_room_by_non_owner_1793@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-01-27 15:34:18.485 ***
bOb_delete_room_by_non_owner_1793@localhost/res1 out
<iq type='set' id='d0c156142831a7d253070a926e351a5b'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:34:18.485 ***
bOb_delete_room_by_non_owner_1793@localhost/res1 in
<iq type='result' id='d0c156142831a7d253070a926e351a5b'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:34:18.486 ***
bOb_delete_room_by_non_owner_1793@localhost/res1 out
<presence/>



*** User 2022-01-27 15:34:18.487 ***
bOb_delete_room_by_non_owner_1793@localhost/res1 in
<presence from='bOb_delete_room_by_non_owner_1793@localhost/res1' to='bob_delete_room_by_non_owner_1793@localhost/res1' xml:lang='en'/>



*** User 2022-01-27 15:34:18.488 ***
kate_delete_room_by_non_owner_1793@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:34:18.488 ***
kate_delete_room_by_non_owner_1793@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='6092881a8253d15b' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-27 15:34:18.488 ***
kate_delete_room_by_non_owner_1793@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:34:18.488 ***
kate_delete_room_by_non_owner_1793@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGthdGVfZGVsZXRlX3Jvb21fYnlfbm9uX293bmVyXzE3OTMAbWFrcm93ZTtw</auth>



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



*** User 2022-01-27 15:34:18.490 ***
kate_delete_room_by_non_owner_1793@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:34:18.490 ***
kate_delete_room_by_non_owner_1793@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='4089cfab1d6447f8' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-27 15:34:18.490 ***
kate_delete_room_by_non_owner_1793@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:34:18.491 ***
kate_delete_room_by_non_owner_1793@localhost/res1 out
<iq type='set' id='2166a0b18f27af8cfc97de44b53190a6'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-01-27 15:34:18.491 ***
kate_delete_room_by_non_owner_1793@localhost/res1 in
<iq id='2166a0b18f27af8cfc97de44b53190a6' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>kate_delete_room_by_non_owner_1793@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-01-27 15:34:18.491 ***
kate_delete_room_by_non_owner_1793@localhost/res1 out
<iq type='set' id='6db242c8003b04f8956512a73b79ae3b'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:34:18.491 ***
kate_delete_room_by_non_owner_1793@localhost/res1 in
<iq type='result' id='6db242c8003b04f8956512a73b79ae3b'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:34:18.491 ***
kate_delete_room_by_non_owner_1793@localhost/res1 out
<presence/>



*** User 2022-01-27 15:34:18.493 ***
kate_delete_room_by_non_owner_1793@localhost/res1 in
<presence from='kate_delete_room_by_non_owner_1793@localhost/res1' to='kate_delete_room_by_non_owner_1793@localhost/res1' xml:lang='en'/>



*** User 2022-01-27 15:34:18.493 ***
alicE_delete_room_by_non_owner_1793@localhost/res1 out
<iq type='set' id='84e5b7e6a3189f4be91fe553966e0b4c' to='muclight.localhost'>
	<query xmlns='urn:xmpp:muclight:0#create'>
		<configuration>
			<roomname>wonderland</roomname>
		</configuration>
		<occupants>
			<user affiliation='member'>bob_delete_room_by_non_owner_1793@localhost</user>
			<user affiliation='member'>kate_delete_room_by_non_owner_1793@localhost</user>
		</occupants>
	</query>
</iq>



*** User 2022-01-27 15:34:18.499 ***
alicE_delete_room_by_non_owner_1793@localhost/res1 in
<message from='1643-297658-495381@muclight.localhost' to='alice_delete_room_by_non_owner_1793@localhost' id='84e5b7e6a3189f4be91fe553966e0b4c' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<version>1643-297658-495372</version>
		<user affiliation='owner'>alice_delete_room_by_non_owner_1793@localhost</user>
	</x>
	<body/>
</message>



*** User 2022-01-27 15:34:18.499 ***
alicE_delete_room_by_non_owner_1793@localhost/res1 in
<iq from='muclight.localhost' to='alicE_delete_room_by_non_owner_1793@localhost/res1' id='84e5b7e6a3189f4be91fe553966e0b4c' type='result'/>



*** User 2022-01-27 15:34:18.499 ***
bOb_delete_room_by_non_owner_1793@localhost/res1 in
<message from='1643-297658-495381@muclight.localhost' to='bob_delete_room_by_non_owner_1793@localhost' id='84e5b7e6a3189f4be91fe553966e0b4c' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<version>1643-297658-495372</version>
		<user affiliation='member'>bob_delete_room_by_non_owner_1793@localhost</user>
	</x>
	<body/>
</message>



*** User 2022-01-27 15:34:18.499 ***
kate_delete_room_by_non_owner_1793@localhost/res1 in
<message from='1643-297658-495381@muclight.localhost' to='kate_delete_room_by_non_owner_1793@localhost' id='84e5b7e6a3189f4be91fe553966e0b4c' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<version>1643-297658-495372</version>
		<user affiliation='member'>kate_delete_room_by_non_owner_1793@localhost</user>
	</x>
	<body/>
</message>



*** User 2022-01-27 15:34:18.504 ***
REST request fails:
Code: 403
Req: {<0.29169.1>,
      <<"/api/muc-lights/muclight.localhost/wonderland/bOb_delete_room_by_non_owner_1793@localhost/management">>,
      <<"DELETE">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"f83638d5ec488281">>}],
      <<>>}
Result: {{<<"403">>,<<"Forbidden">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 15:34:17 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"28">>}],
         <<"you can not delete this room">>,159,3733}
Params: #{body => <<>>,method => <<"DELETE">>,
          path =>
              <<"/api/muc-lights/muclight.localhost/wonderland/bOb_delete_room_by_non_owner_1793@localhost/management">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 15:34:18.504 ***
kate_delete_room_by_non_owner_1793@localhost/res1 out
</stream:stream>

*** User 2022-01-27 15:34:18.504 ***
kate_delete_room_by_non_owner_1793@localhost/res1 in
</stream:stream>

*** User 2022-01-27 15:34:18.504 ***
bOb_delete_room_by_non_owner_1793@localhost/res1 out
</stream:stream>

*** User 2022-01-27 15:34:18.505 ***
bOb_delete_room_by_non_owner_1793@localhost/res1 in
</stream:stream>

*** User 2022-01-27 15:34:18.505 ***
alicE_delete_room_by_non_owner_1793@localhost/res1 out
</stream:stream>

*** User 2022-01-27 15:34:18.505 ***
alicE_delete_room_by_non_owner_1793@localhost/res1 in
</stream:stream>
*** CT 2022-01-27 15:34:18.507 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_2348.html
*** CT 2022-01-27 15:34:18.507 *** View log from node mongooseim@localhost when finished mongooseim@localhost_5385.html



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