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

=== Config value:

    [{watchdog,<0.31009.1>},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/muc_light_http_api_SUITE_data"},
     {preset,"pgsql_mnesia"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@b90e3713176e.2022-03-07_09.29.55/big_tests.tests.muc_light_http_api_SUITE.logs/run.2022-03-07_09.39.10/muc_light_http_api_suite.delete_room_by_non_owner.125442.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@b90e3713176e.2022-03-07_09.29.55/big_tests.tests.muc_light_http_api_SUITE.logs/run.2022-03-07_09.39.10/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@b90e3713176e.2022-03-07_09.29.55"

=== Started at 2022-03-07 09:39:11


*** CT 2022-03-07 09:39:11.158 *** View log from node mongooseim@localhost when started mongooseim@localhost_4533.html
*** CT 2022-03-07 09:39:11.158 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_2195.html

*** User 2022-03-07 09:39:11.208 ***
alicE_delete_room_by_non_owner_1730@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-03-07 09:39:11.210 ***
alicE_delete_room_by_non_owner_1730@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='7c9b7523cb735128' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-07 09:39:11.210 ***
alicE_delete_room_by_non_owner_1730@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-03-07 09:39:11.210 ***
alicE_delete_room_by_non_owner_1730@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX2RlbGV0ZV9yb29tX2J5X25vbl9vd25lcl8xNzMwAG1hdHlncnlzYQ==</auth>



*** User 2022-03-07 09:39:11.213 ***
alicE_delete_room_by_non_owner_1730@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-03-07 09:39:11.213 ***
alicE_delete_room_by_non_owner_1730@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-03-07 09:39:11.214 ***
alicE_delete_room_by_non_owner_1730@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='48d6b32fe7ff0db0' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-07 09:39:11.214 ***
alicE_delete_room_by_non_owner_1730@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-03-07 09:39:11.214 ***
alicE_delete_room_by_non_owner_1730@localhost/res1 out
<iq type='set' id='1344a11984141af9ac677df9e1a6e098'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-03-07 09:39:11.215 ***
alicE_delete_room_by_non_owner_1730@localhost/res1 in
<iq id='1344a11984141af9ac677df9e1a6e098' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alicE_delete_room_by_non_owner_1730@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-03-07 09:39:11.215 ***
alicE_delete_room_by_non_owner_1730@localhost/res1 out
<iq type='set' id='1a1098e7801e5a14f8df235919b930c7'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-07 09:39:11.216 ***
alicE_delete_room_by_non_owner_1730@localhost/res1 in
<iq type='result' id='1a1098e7801e5a14f8df235919b930c7'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-07 09:39:11.216 ***
alicE_delete_room_by_non_owner_1730@localhost/res1 out
<presence/>



*** User 2022-03-07 09:39:11.218 ***
alicE_delete_room_by_non_owner_1730@localhost/res1 in
<presence from='alicE_delete_room_by_non_owner_1730@localhost/res1' to='alice_delete_room_by_non_owner_1730@localhost/res1' xml:lang='en'/>



*** User 2022-03-07 09:39:11.219 ***
bOb_delete_room_by_non_owner_1730@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-03-07 09:39:11.219 ***
bOb_delete_room_by_non_owner_1730@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='e3c2b2611feb3a56' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-07 09:39:11.219 ***
bOb_delete_room_by_non_owner_1730@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-03-07 09:39:11.220 ***
bOb_delete_room_by_non_owner_1730@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9kZWxldGVfcm9vbV9ieV9ub25fb3duZXJfMTczMABtYWtyb2xpa2E=</auth>



*** User 2022-03-07 09:39:11.221 ***
bOb_delete_room_by_non_owner_1730@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-03-07 09:39:11.221 ***
bOb_delete_room_by_non_owner_1730@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-03-07 09:39:11.221 ***
bOb_delete_room_by_non_owner_1730@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='219c50fc63d63ff0' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-07 09:39:11.221 ***
bOb_delete_room_by_non_owner_1730@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-03-07 09:39:11.221 ***
bOb_delete_room_by_non_owner_1730@localhost/res1 out
<iq type='set' id='8c3504860a6a81355bc74e35ba7468c5'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-03-07 09:39:11.222 ***
bOb_delete_room_by_non_owner_1730@localhost/res1 in
<iq id='8c3504860a6a81355bc74e35ba7468c5' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bOb_delete_room_by_non_owner_1730@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-03-07 09:39:11.222 ***
bOb_delete_room_by_non_owner_1730@localhost/res1 out
<iq type='set' id='90674ac1abf5a908e27686237123ba21'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-07 09:39:11.223 ***
bOb_delete_room_by_non_owner_1730@localhost/res1 in
<iq type='result' id='90674ac1abf5a908e27686237123ba21'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-07 09:39:11.223 ***
bOb_delete_room_by_non_owner_1730@localhost/res1 out
<presence/>



*** User 2022-03-07 09:39:11.224 ***
bOb_delete_room_by_non_owner_1730@localhost/res1 in
<presence from='bOb_delete_room_by_non_owner_1730@localhost/res1' to='bob_delete_room_by_non_owner_1730@localhost/res1' xml:lang='en'/>



*** User 2022-03-07 09:39:11.225 ***
kate_delete_room_by_non_owner_1730@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-03-07 09:39:11.226 ***
kate_delete_room_by_non_owner_1730@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='5b3bf1b6fb91b1f5' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-07 09:39:11.226 ***
kate_delete_room_by_non_owner_1730@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-03-07 09:39:11.226 ***
kate_delete_room_by_non_owner_1730@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGthdGVfZGVsZXRlX3Jvb21fYnlfbm9uX293bmVyXzE3MzAAbWFrcm93ZTtw</auth>



*** User 2022-03-07 09:39:11.227 ***
kate_delete_room_by_non_owner_1730@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-03-07 09:39:11.227 ***
kate_delete_room_by_non_owner_1730@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-03-07 09:39:11.227 ***
kate_delete_room_by_non_owner_1730@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='185769fc50888d29' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-07 09:39:11.227 ***
kate_delete_room_by_non_owner_1730@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-03-07 09:39:11.228 ***
kate_delete_room_by_non_owner_1730@localhost/res1 out
<iq type='set' id='47283a64b955f25e3dde5c2a5429b42a'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-03-07 09:39:11.228 ***
kate_delete_room_by_non_owner_1730@localhost/res1 in
<iq id='47283a64b955f25e3dde5c2a5429b42a' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>kate_delete_room_by_non_owner_1730@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-03-07 09:39:11.228 ***
kate_delete_room_by_non_owner_1730@localhost/res1 out
<iq type='set' id='4f17c0b60ddd01ed59e9b924bca3424d'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-07 09:39:11.229 ***
kate_delete_room_by_non_owner_1730@localhost/res1 in
<iq type='result' id='4f17c0b60ddd01ed59e9b924bca3424d'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-07 09:39:11.229 ***
kate_delete_room_by_non_owner_1730@localhost/res1 out
<presence/>



*** User 2022-03-07 09:39:11.230 ***
kate_delete_room_by_non_owner_1730@localhost/res1 in
<presence from='kate_delete_room_by_non_owner_1730@localhost/res1' to='kate_delete_room_by_non_owner_1730@localhost/res1' xml:lang='en'/>



*** User 2022-03-07 09:39:11.230 ***
alicE_delete_room_by_non_owner_1730@localhost/res1 out
<iq type='set' id='0e99de19823904436669c7973305c4e8' to='delete_room_by_non_owner@muclight.localhost'>
	<query xmlns='urn:xmpp:muclight:0#create'>
		<configuration>
			<roomname>wonderland</roomname>
		</configuration>
		<occupants>
			<user affiliation='member'>bob_delete_room_by_non_owner_1730@localhost</user>
			<user affiliation='member'>kate_delete_room_by_non_owner_1730@localhost</user>
		</occupants>
	</query>
</iq>



*** User 2022-03-07 09:39:11.234 ***
alicE_delete_room_by_non_owner_1730@localhost/res1 in
<message from='delete_room_by_non_owner@muclight.localhost' to='alice_delete_room_by_non_owner_1730@localhost' id='0e99de19823904436669c7973305c4e8' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<version>1646-645951-231626</version>
		<user affiliation='owner'>alice_delete_room_by_non_owner_1730@localhost</user>
	</x>
	<body/>
</message>



*** User 2022-03-07 09:39:11.234 ***
alicE_delete_room_by_non_owner_1730@localhost/res1 in
<iq from='delete_room_by_non_owner@muclight.localhost' to='alicE_delete_room_by_non_owner_1730@localhost/res1' id='0e99de19823904436669c7973305c4e8' type='result'/>



*** User 2022-03-07 09:39:11.234 ***
bOb_delete_room_by_non_owner_1730@localhost/res1 in
<message from='delete_room_by_non_owner@muclight.localhost' to='bob_delete_room_by_non_owner_1730@localhost' id='0e99de19823904436669c7973305c4e8' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<version>1646-645951-231626</version>
		<user affiliation='member'>bob_delete_room_by_non_owner_1730@localhost</user>
	</x>
	<body/>
</message>



*** User 2022-03-07 09:39:11.234 ***
kate_delete_room_by_non_owner_1730@localhost/res1 in
<message from='delete_room_by_non_owner@muclight.localhost' to='kate_delete_room_by_non_owner_1730@localhost' id='0e99de19823904436669c7973305c4e8' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<version>1646-645951-231626</version>
		<user affiliation='member'>kate_delete_room_by_non_owner_1730@localhost</user>
	</x>
	<body/>
</message>



*** User 2022-03-07 09:39:11.236 ***
REST request fails:
Code: 403
Req: {<0.31096.1>,
      <<"/api/muc-lights/muclight.localhost/delete_room_by_non_owner/bOb_delete_room_by_non_owner_1730@localhost/management">>,
      <<"DELETE">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"7ac7a4dafecabfc0">>}],
      <<>>}
Result: {{<<"403">>,<<"Forbidden">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 07 Mar 2022 09:39:10 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"34">>}],
         <<"Given user cannot delete this room">>,165,1106}
Params: #{body => <<>>,method => <<"DELETE">>,
          path =>
              <<"/api/muc-lights/muclight.localhost/delete_room_by_non_owner/bOb_delete_room_by_non_owner_1730@localhost/management">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-07 09:39:11.236 ***
kate_delete_room_by_non_owner_1730@localhost/res1 out
</stream:stream>

*** User 2022-03-07 09:39:11.237 ***
kate_delete_room_by_non_owner_1730@localhost/res1 in
</stream:stream>

*** User 2022-03-07 09:39:11.237 ***
bOb_delete_room_by_non_owner_1730@localhost/res1 out
</stream:stream>

*** User 2022-03-07 09:39:11.237 ***
bOb_delete_room_by_non_owner_1730@localhost/res1 in
</stream:stream>

*** User 2022-03-07 09:39:11.237 ***
alicE_delete_room_by_non_owner_1730@localhost/res1 out
</stream:stream>

*** User 2022-03-07 09:39:11.237 ***
alicE_delete_room_by_non_owner_1730@localhost/res1 in
</stream:stream>
*** CT 2022-03-07 09:39:11.240 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_2195.html
*** CT 2022-03-07 09:39:11.241 *** View log from node mongooseim@localhost when finished mongooseim@localhost_4533.html



=== Ended at 2022-03-07 09:39:11
=== successfully completed test case
=== === Returned value: ok