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

=== Config value:

    [{watchdog,<0.23067.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@88d84ff17c71.2022-03-04_11.16.52/big_tests.tests.muc_light_http_api_SUITE.logs/run.2022-03-04_11.24.21/muc_light_http_api_suite.delete_room_by_non_owner.32645.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@88d84ff17c71.2022-03-04_11.16.52/big_tests.tests.muc_light_http_api_SUITE.logs/run.2022-03-04_11.24.21/log_private/"},
     {escalus_users,[{alice,[{username,<<"alicE">>},
                             {server,<<"domain.example.com">>},
                             {host,<<"localhost">>},
                             {password,<<"matygrysa">>}]},
                     {bob,[{username,<<"bOb">>},
                           {server,<<"domain.example.com">>},
                           {host,<<"localhost">>},
                           {password,<<"makrolika">>}]},
                     {kate,[{username,<<"kate">>},
                            {server,<<"domain.example.com">>},
                            {host,<<"localhost">>},
                            {password,<<"makrowe;p">>}]}]}]

=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@88d84ff17c71.2022-03-04_11.16.52"

=== Started at 2022-03-04 11:24:21


*** CT 2022-03-04 11:24:21.979 *** View log from node mongooseim@localhost when started mongooseim@localhost_2344.html
*** CT 2022-03-04 11:24:21.980 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_606.html

*** User 2022-03-04 11:24:21.999 ***
alicE_delete_room_by_non_owner_1716@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-03-04 11:24:22.000 ***
alicE_delete_room_by_non_owner_1716@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='2b6d41ead8078b88' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-03-04 11:24:22.000 ***
alicE_delete_room_by_non_owner_1716@domain.example.com/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-04 11:24:22.000 ***
alicE_delete_room_by_non_owner_1716@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX2RlbGV0ZV9yb29tX2J5X25vbl9vd25lcl8xNzE2AG1hdHlncnlzYQ==</auth>



*** User 2022-03-04 11:24:22.001 ***
alicE_delete_room_by_non_owner_1716@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-03-04 11:24:22.001 ***
alicE_delete_room_by_non_owner_1716@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-03-04 11:24:22.001 ***
alicE_delete_room_by_non_owner_1716@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='921ce6863fa9a7a4' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-03-04 11:24:22.001 ***
alicE_delete_room_by_non_owner_1716@domain.example.com/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-04 11:24:22.001 ***
alicE_delete_room_by_non_owner_1716@domain.example.com/res1 out
<iq type='set' id='f078008ec66d6a827f2a5d270b6b305b'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-03-04 11:24:22.001 ***
alicE_delete_room_by_non_owner_1716@domain.example.com/res1 in
<iq id='f078008ec66d6a827f2a5d270b6b305b' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alicE_delete_room_by_non_owner_1716@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2022-03-04 11:24:22.002 ***
alicE_delete_room_by_non_owner_1716@domain.example.com/res1 out
<iq type='set' id='6b0c93efde7a23f6d7a2146328a324fd'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-04 11:24:22.002 ***
alicE_delete_room_by_non_owner_1716@domain.example.com/res1 in
<iq type='result' id='6b0c93efde7a23f6d7a2146328a324fd'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-04 11:24:22.002 ***
alicE_delete_room_by_non_owner_1716@domain.example.com/res1 out
<presence/>



*** User 2022-03-04 11:24:22.003 ***
alicE_delete_room_by_non_owner_1716@domain.example.com/res1 in
<presence from='alicE_delete_room_by_non_owner_1716@domain.example.com/res1' to='alice_delete_room_by_non_owner_1716@domain.example.com/res1' xml:lang='en'/>



*** User 2022-03-04 11:24:22.004 ***
bOb_delete_room_by_non_owner_1716@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-03-04 11:24:22.004 ***
bOb_delete_room_by_non_owner_1716@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='4702a55924519eef' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-03-04 11:24:22.005 ***
bOb_delete_room_by_non_owner_1716@domain.example.com/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-04 11:24:22.005 ***
bOb_delete_room_by_non_owner_1716@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9kZWxldGVfcm9vbV9ieV9ub25fb3duZXJfMTcxNgBtYWtyb2xpa2E=</auth>



*** User 2022-03-04 11:24:22.005 ***
bOb_delete_room_by_non_owner_1716@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-03-04 11:24:22.005 ***
bOb_delete_room_by_non_owner_1716@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-03-04 11:24:22.006 ***
bOb_delete_room_by_non_owner_1716@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='238ee21ea217fe2d' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-03-04 11:24:22.006 ***
bOb_delete_room_by_non_owner_1716@domain.example.com/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-04 11:24:22.006 ***
bOb_delete_room_by_non_owner_1716@domain.example.com/res1 out
<iq type='set' id='1f339ef514782adcef4ecae3c326aa88'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-03-04 11:24:22.006 ***
bOb_delete_room_by_non_owner_1716@domain.example.com/res1 in
<iq id='1f339ef514782adcef4ecae3c326aa88' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bOb_delete_room_by_non_owner_1716@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2022-03-04 11:24:22.006 ***
bOb_delete_room_by_non_owner_1716@domain.example.com/res1 out
<iq type='set' id='333dcc2970840f1aaa2916edd483983e'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-04 11:24:22.007 ***
bOb_delete_room_by_non_owner_1716@domain.example.com/res1 in
<iq type='result' id='333dcc2970840f1aaa2916edd483983e'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-04 11:24:22.007 ***
bOb_delete_room_by_non_owner_1716@domain.example.com/res1 out
<presence/>



*** User 2022-03-04 11:24:22.008 ***
bOb_delete_room_by_non_owner_1716@domain.example.com/res1 in
<presence from='bOb_delete_room_by_non_owner_1716@domain.example.com/res1' to='bob_delete_room_by_non_owner_1716@domain.example.com/res1' xml:lang='en'/>



*** User 2022-03-04 11:24:22.009 ***
kate_delete_room_by_non_owner_1716@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-03-04 11:24:22.009 ***
kate_delete_room_by_non_owner_1716@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='b737fdb37583ab47' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-03-04 11:24:22.009 ***
kate_delete_room_by_non_owner_1716@domain.example.com/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-04 11:24:22.009 ***
kate_delete_room_by_non_owner_1716@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGthdGVfZGVsZXRlX3Jvb21fYnlfbm9uX293bmVyXzE3MTYAbWFrcm93ZTtw</auth>



*** User 2022-03-04 11:24:22.010 ***
kate_delete_room_by_non_owner_1716@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-03-04 11:24:22.010 ***
kate_delete_room_by_non_owner_1716@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-03-04 11:24:22.011 ***
kate_delete_room_by_non_owner_1716@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='9d7565b71a41f00b' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-03-04 11:24:22.011 ***
kate_delete_room_by_non_owner_1716@domain.example.com/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-04 11:24:22.011 ***
kate_delete_room_by_non_owner_1716@domain.example.com/res1 out
<iq type='set' id='faa0a5da4759f7fab4345a1fdc586509'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-03-04 11:24:22.011 ***
kate_delete_room_by_non_owner_1716@domain.example.com/res1 in
<iq id='faa0a5da4759f7fab4345a1fdc586509' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>kate_delete_room_by_non_owner_1716@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2022-03-04 11:24:22.012 ***
kate_delete_room_by_non_owner_1716@domain.example.com/res1 out
<iq type='set' id='b8f7183a3e2ec556aa9152a447e45454'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-04 11:24:22.012 ***
kate_delete_room_by_non_owner_1716@domain.example.com/res1 in
<iq type='result' id='b8f7183a3e2ec556aa9152a447e45454'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-04 11:24:22.012 ***
kate_delete_room_by_non_owner_1716@domain.example.com/res1 out
<presence/>



*** User 2022-03-04 11:24:22.013 ***
kate_delete_room_by_non_owner_1716@domain.example.com/res1 in
<presence from='kate_delete_room_by_non_owner_1716@domain.example.com/res1' to='kate_delete_room_by_non_owner_1716@domain.example.com/res1' xml:lang='en'/>



*** User 2022-03-04 11:24:22.013 ***
alicE_delete_room_by_non_owner_1716@domain.example.com/res1 out
<iq type='set' id='62c699381b8f485a4935916e581b1e58' to='delete_room_by_non_owner@muclight2.domain.example.com'>
	<query xmlns='urn:xmpp:muclight:0#create'>
		<configuration>
			<roomname>wonderland</roomname>
		</configuration>
		<occupants>
			<user affiliation='member'>bob_delete_room_by_non_owner_1716@domain.example.com</user>
			<user affiliation='member'>kate_delete_room_by_non_owner_1716@domain.example.com</user>
		</occupants>
	</query>
</iq>



*** User 2022-03-04 11:24:22.021 ***
alicE_delete_room_by_non_owner_1716@domain.example.com/res1 in
<message from='delete_room_by_non_owner@muclight2.domain.example.com' to='alice_delete_room_by_non_owner_1716@domain.example.com' id='62c699381b8f485a4935916e581b1e58' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<version>1646-393062-15494</version>
		<user affiliation='owner'>alice_delete_room_by_non_owner_1716@domain.example.com</user>
	</x>
	<body/>
</message>



*** User 2022-03-04 11:24:22.021 ***
alicE_delete_room_by_non_owner_1716@domain.example.com/res1 in
<iq from='delete_room_by_non_owner@muclight2.domain.example.com' to='alicE_delete_room_by_non_owner_1716@domain.example.com/res1' id='62c699381b8f485a4935916e581b1e58' type='result'/>



*** User 2022-03-04 11:24:22.021 ***
bOb_delete_room_by_non_owner_1716@domain.example.com/res1 in
<message from='delete_room_by_non_owner@muclight2.domain.example.com' to='bob_delete_room_by_non_owner_1716@domain.example.com' id='62c699381b8f485a4935916e581b1e58' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<version>1646-393062-15494</version>
		<user affiliation='member'>bob_delete_room_by_non_owner_1716@domain.example.com</user>
	</x>
	<body/>
</message>



*** User 2022-03-04 11:24:22.021 ***
kate_delete_room_by_non_owner_1716@domain.example.com/res1 in
<message from='delete_room_by_non_owner@muclight2.domain.example.com' to='kate_delete_room_by_non_owner_1716@domain.example.com' id='62c699381b8f485a4935916e581b1e58' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<version>1646-393062-15494</version>
		<user affiliation='member'>kate_delete_room_by_non_owner_1716@domain.example.com</user>
	</x>
	<body/>
</message>



*** User 2022-03-04 11:24:22.025 ***
REST request fails:
Code: 403
Req: {<0.23154.1>,
      <<"/api/muc-lights/muclight2.domain.example.com/delete_room_by_non_owner/bOb_delete_room_by_non_owner_1716@domain.example.com/management">>,
      <<"DELETE">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"d0b32a2292051b85">>}],
      <<>>}
Result: {{<<"403">>,<<"Forbidden">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Fri, 04 Mar 2022 11:24:21 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"34">>}],
         <<"Given user cannot delete this room">>,165,2875}
Params: #{body => <<>>,method => <<"DELETE">>,
          path =>
              <<"/api/muc-lights/muclight2.domain.example.com/delete_room_by_non_owner/bOb_delete_room_by_non_owner_1716@domain.example.com/management">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-04 11:24:22.025 ***
kate_delete_room_by_non_owner_1716@domain.example.com/res1 out
</stream:stream>

*** User 2022-03-04 11:24:22.025 ***
kate_delete_room_by_non_owner_1716@domain.example.com/res1 in
</stream:stream>

*** User 2022-03-04 11:24:22.025 ***
bOb_delete_room_by_non_owner_1716@domain.example.com/res1 out
</stream:stream>

*** User 2022-03-04 11:24:22.026 ***
bOb_delete_room_by_non_owner_1716@domain.example.com/res1 in
</stream:stream>

*** User 2022-03-04 11:24:22.026 ***
alicE_delete_room_by_non_owner_1716@domain.example.com/res1 out
</stream:stream>

*** User 2022-03-04 11:24:22.026 ***
alicE_delete_room_by_non_owner_1716@domain.example.com/res1 in
</stream:stream>
*** CT 2022-03-04 11:24:22.028 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_606.html
*** CT 2022-03-04 11:24:22.029 *** View log from node mongooseim@localhost when finished mongooseim@localhost_2344.html



=== Ended at 2022-03-04 11:24:22
=== successfully completed test case
=== === Returned value: ok