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

=== Config value:

    [{watchdog,<0.2893.1>},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/muc_light_http_api_SUITE_data"},
     {preset,"ldap_mnesia"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@12130b74fc81.2022-03-03_10.28.39/big_tests.tests.muc_light_http_api_SUITE.logs/run.2022-03-03_10.36.06/muc_light_http_api_suite.delete_room_by_non_owner.20100.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@12130b74fc81.2022-03-03_10.28.39/big_tests.tests.muc_light_http_api_SUITE.logs/run.2022-03-03_10.36.06/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@12130b74fc81.2022-03-03_10.28.39"

=== Started at 2022-03-03 10:36:06


*** CT 2022-03-03 10:36:06.914 *** View log from node mongooseim@localhost when started mongooseim@localhost_4495.html
*** CT 2022-03-03 10:36:06.915 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_2305.html

*** User 2022-03-03 10:36:06.927 ***
alicE_delete_room_by_non_owner_955@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-03 10:36:06.927 ***
alicE_delete_room_by_non_owner_955@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='e1c3e8f84df2139b' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-03 10:36:06.927 ***
alicE_delete_room_by_non_owner_955@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>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-03 10:36:06.927 ***
alicE_delete_room_by_non_owner_955@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX2RlbGV0ZV9yb29tX2J5X25vbl9vd25lcl85NTUAbWF0eWdyeXNh</auth>



*** User 2022-03-03 10:36:06.928 ***
alicE_delete_room_by_non_owner_955@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-03-03 10:36:06.928 ***
alicE_delete_room_by_non_owner_955@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-03 10:36:06.929 ***
alicE_delete_room_by_non_owner_955@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='2c130e8fa62b512d' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-03 10:36:06.929 ***
alicE_delete_room_by_non_owner_955@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-03 10:36:06.929 ***
alicE_delete_room_by_non_owner_955@localhost/res1 out
<iq type='set' id='62fbb5b8163707d17ba3bd4a34e0714a'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-03-03 10:36:06.929 ***
alicE_delete_room_by_non_owner_955@localhost/res1 in
<iq id='62fbb5b8163707d17ba3bd4a34e0714a' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alicE_delete_room_by_non_owner_955@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-03-03 10:36:06.929 ***
alicE_delete_room_by_non_owner_955@localhost/res1 out
<iq type='set' id='82381808f6c09f61c61ce0ed26a66e25'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-03 10:36:06.930 ***
alicE_delete_room_by_non_owner_955@localhost/res1 in
<iq type='result' id='82381808f6c09f61c61ce0ed26a66e25'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-03 10:36:06.930 ***
alicE_delete_room_by_non_owner_955@localhost/res1 out
<presence/>



*** User 2022-03-03 10:36:06.930 ***
alicE_delete_room_by_non_owner_955@localhost/res1 in
<presence from='alicE_delete_room_by_non_owner_955@localhost/res1' to='alice_delete_room_by_non_owner_955@localhost/res1' xml:lang='en'/>



*** User 2022-03-03 10:36:06.931 ***
bOb_delete_room_by_non_owner_955@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-03 10:36:06.931 ***
bOb_delete_room_by_non_owner_955@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='23e314caf9e61e66' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-03 10:36:06.931 ***
bOb_delete_room_by_non_owner_955@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>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-03 10:36:06.931 ***
bOb_delete_room_by_non_owner_955@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9kZWxldGVfcm9vbV9ieV9ub25fb3duZXJfOTU1AG1ha3JvbGlrYQ==</auth>



*** User 2022-03-03 10:36:06.932 ***
bOb_delete_room_by_non_owner_955@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-03-03 10:36:06.932 ***
bOb_delete_room_by_non_owner_955@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-03 10:36:06.933 ***
bOb_delete_room_by_non_owner_955@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='1cbdedfa63395d11' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-03 10:36:06.933 ***
bOb_delete_room_by_non_owner_955@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-03 10:36:06.933 ***
bOb_delete_room_by_non_owner_955@localhost/res1 out
<iq type='set' id='f3f24619fd60b68aff16ed5fbaf22a7c'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-03-03 10:36:06.933 ***
bOb_delete_room_by_non_owner_955@localhost/res1 in
<iq id='f3f24619fd60b68aff16ed5fbaf22a7c' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bOb_delete_room_by_non_owner_955@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-03-03 10:36:06.933 ***
bOb_delete_room_by_non_owner_955@localhost/res1 out
<iq type='set' id='df957fb97c23303cce75b231c719b9a9'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-03 10:36:06.934 ***
bOb_delete_room_by_non_owner_955@localhost/res1 in
<iq type='result' id='df957fb97c23303cce75b231c719b9a9'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-03 10:36:06.934 ***
bOb_delete_room_by_non_owner_955@localhost/res1 out
<presence/>



*** User 2022-03-03 10:36:06.934 ***
bOb_delete_room_by_non_owner_955@localhost/res1 in
<presence from='bOb_delete_room_by_non_owner_955@localhost/res1' to='bob_delete_room_by_non_owner_955@localhost/res1' xml:lang='en'/>



*** User 2022-03-03 10:36:06.935 ***
kate_delete_room_by_non_owner_955@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-03 10:36:06.935 ***
kate_delete_room_by_non_owner_955@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='b0da4ebae26544fd' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-03 10:36:06.935 ***
kate_delete_room_by_non_owner_955@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>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-03 10:36:06.935 ***
kate_delete_room_by_non_owner_955@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGthdGVfZGVsZXRlX3Jvb21fYnlfbm9uX293bmVyXzk1NQBtYWtyb3dlO3A=</auth>



*** User 2022-03-03 10:36:06.936 ***
kate_delete_room_by_non_owner_955@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-03-03 10:36:06.936 ***
kate_delete_room_by_non_owner_955@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-03 10:36:06.937 ***
kate_delete_room_by_non_owner_955@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='6f82f27fb04cf341' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-03 10:36:06.937 ***
kate_delete_room_by_non_owner_955@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-03 10:36:06.937 ***
kate_delete_room_by_non_owner_955@localhost/res1 out
<iq type='set' id='12ffa6a33cc3043debcc83e379456120'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-03-03 10:36:06.937 ***
kate_delete_room_by_non_owner_955@localhost/res1 in
<iq id='12ffa6a33cc3043debcc83e379456120' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>kate_delete_room_by_non_owner_955@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-03-03 10:36:06.937 ***
kate_delete_room_by_non_owner_955@localhost/res1 out
<iq type='set' id='82d0bdbb512acefa5391debd8dd78452'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-03 10:36:06.937 ***
kate_delete_room_by_non_owner_955@localhost/res1 in
<iq type='result' id='82d0bdbb512acefa5391debd8dd78452'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-03 10:36:06.937 ***
kate_delete_room_by_non_owner_955@localhost/res1 out
<presence/>



*** User 2022-03-03 10:36:06.938 ***
kate_delete_room_by_non_owner_955@localhost/res1 in
<presence from='kate_delete_room_by_non_owner_955@localhost/res1' to='kate_delete_room_by_non_owner_955@localhost/res1' xml:lang='en'/>



*** User 2022-03-03 10:36:06.938 ***
alicE_delete_room_by_non_owner_955@localhost/res1 out
<iq type='set' id='cbdf151a0f11806896892019d26d24bf' 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_955@localhost</user>
			<user affiliation='member'>kate_delete_room_by_non_owner_955@localhost</user>
		</occupants>
	</query>
</iq>



*** User 2022-03-03 10:36:06.939 ***
alicE_delete_room_by_non_owner_955@localhost/res1 in
<message from='delete_room_by_non_owner@muclight.localhost' to='alice_delete_room_by_non_owner_955@localhost' id='cbdf151a0f11806896892019d26d24bf' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<version>1646-303766-938694</version>
		<user affiliation='owner'>alice_delete_room_by_non_owner_955@localhost</user>
	</x>
	<body/>
</message>



*** User 2022-03-03 10:36:06.939 ***
alicE_delete_room_by_non_owner_955@localhost/res1 in
<iq from='delete_room_by_non_owner@muclight.localhost' to='alicE_delete_room_by_non_owner_955@localhost/res1' id='cbdf151a0f11806896892019d26d24bf' type='result'/>



*** User 2022-03-03 10:36:06.939 ***
bOb_delete_room_by_non_owner_955@localhost/res1 in
<message from='delete_room_by_non_owner@muclight.localhost' to='bob_delete_room_by_non_owner_955@localhost' id='cbdf151a0f11806896892019d26d24bf' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<version>1646-303766-938694</version>
		<user affiliation='member'>bob_delete_room_by_non_owner_955@localhost</user>
	</x>
	<body/>
</message>



*** User 2022-03-03 10:36:06.939 ***
kate_delete_room_by_non_owner_955@localhost/res1 in
<message from='delete_room_by_non_owner@muclight.localhost' to='kate_delete_room_by_non_owner_955@localhost' id='cbdf151a0f11806896892019d26d24bf' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<version>1646-303766-938694</version>
		<user affiliation='member'>kate_delete_room_by_non_owner_955@localhost</user>
	</x>
	<body/>
</message>



*** User 2022-03-03 10:36:06.940 ***
REST request fails:
Code: 403
Req: {<0.2981.1>,
      <<"/api/muc-lights/muclight.localhost/delete_room_by_non_owner/bOb_delete_room_by_non_owner_955@localhost/management">>,
      <<"DELETE">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"d72ca684ff4f93bb">>}],
      <<>>}
Result: {{<<"403">>,<<"Forbidden">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 03 Mar 2022 10:36:06 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"34">>}],
         <<"Given user cannot delete this room">>,165,738}
Params: #{body => <<>>,method => <<"DELETE">>,
          path =>
              <<"/api/muc-lights/muclight.localhost/delete_room_by_non_owner/bOb_delete_room_by_non_owner_955@localhost/management">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-03 10:36:06.941 ***
kate_delete_room_by_non_owner_955@localhost/res1 out
</stream:stream>

*** User 2022-03-03 10:36:06.941 ***
kate_delete_room_by_non_owner_955@localhost/res1 in
</stream:stream>

*** User 2022-03-03 10:36:06.941 ***
bOb_delete_room_by_non_owner_955@localhost/res1 out
</stream:stream>

*** User 2022-03-03 10:36:06.941 ***
bOb_delete_room_by_non_owner_955@localhost/res1 in
</stream:stream>

*** User 2022-03-03 10:36:06.941 ***
alicE_delete_room_by_non_owner_955@localhost/res1 out
</stream:stream>

*** User 2022-03-03 10:36:06.941 ***
alicE_delete_room_by_non_owner_955@localhost/res1 in
</stream:stream>
*** CT 2022-03-03 10:36:06.944 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_2305.html
*** CT 2022-03-03 10:36:06.945 *** View log from node mongooseim@localhost when finished mongooseim@localhost_4495.html



=== Ended at 2022-03-03 10:36:06
=== successfully completed test case
=== === Returned value: ok