=== Test case: muc_light_http_api_SUITE:delete_room_by_non_owner/1 (click for source code)
=== Config value:
[{watchdog,<0.28533.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@ebe8a8f9fc53.2022-01-25_16.21.59/big_tests.tests.muc_light_http_api_SUITE.logs/run.2022-01-25_16.31.49/muc_light_http_api_suite.delete_room_by_non_owner.122114.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@ebe8a8f9fc53.2022-01-25_16.21.59/big_tests.tests.muc_light_http_api_SUITE.logs/run.2022-01-25_16.31.49/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@ebe8a8f9fc53.2022-01-25_16.21.59"
=== Started at 2022-01-25 16:31:50
*** User 2022-01-25 16:31:50.405 ***
alicE_delete_room_by_non_owner_1864@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-25 16:31:50.405 ***
alicE_delete_room_by_non_owner_1864@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='98bf6ec9ca31dbb7' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-01-25 16:31:50.406 ***
alicE_delete_room_by_non_owner_1864@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-25 16:31:50.406 ***
alicE_delete_room_by_non_owner_1864@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX2RlbGV0ZV9yb29tX2J5X25vbl9vd25lcl8xODY0AG1hdHlncnlzYQ==</auth>
*** User 2022-01-25 16:31:50.407 ***
alicE_delete_room_by_non_owner_1864@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2022-01-25 16:31:50.407 ***
alicE_delete_room_by_non_owner_1864@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-25 16:31:50.407 ***
alicE_delete_room_by_non_owner_1864@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='4407350ee77bc000' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-01-25 16:31:50.407 ***
alicE_delete_room_by_non_owner_1864@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-25 16:31:50.407 ***
alicE_delete_room_by_non_owner_1864@localhost/res1 out
<iq type='set' id='c2ba624b3bce64bb32d6066edba16b02'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2022-01-25 16:31:50.408 ***
alicE_delete_room_by_non_owner_1864@localhost/res1 in
<iq id='c2ba624b3bce64bb32d6066edba16b02' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>alicE_delete_room_by_non_owner_1864@localhost/res1</jid>
</bind>
</iq>
*** User 2022-01-25 16:31:50.408 ***
alicE_delete_room_by_non_owner_1864@localhost/res1 out
<iq type='set' id='469c4782f7c59f9522ade79ec6d071c3'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-25 16:31:50.408 ***
alicE_delete_room_by_non_owner_1864@localhost/res1 in
<iq type='result' id='469c4782f7c59f9522ade79ec6d071c3'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-25 16:31:50.408 ***
alicE_delete_room_by_non_owner_1864@localhost/res1 out
<presence/>
*** User 2022-01-25 16:31:50.409 ***
alicE_delete_room_by_non_owner_1864@localhost/res1 in
<presence from='alicE_delete_room_by_non_owner_1864@localhost/res1' to='alice_delete_room_by_non_owner_1864@localhost/res1' xml:lang='en'/>
*** User 2022-01-25 16:31:50.410 ***
bOb_delete_room_by_non_owner_1864@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-25 16:31:50.410 ***
bOb_delete_room_by_non_owner_1864@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='d8f14dae3f8c0ef9' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-01-25 16:31:50.410 ***
bOb_delete_room_by_non_owner_1864@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-25 16:31:50.410 ***
bOb_delete_room_by_non_owner_1864@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9kZWxldGVfcm9vbV9ieV9ub25fb3duZXJfMTg2NABtYWtyb2xpa2E=</auth>
*** User 2022-01-25 16:31:50.412 ***
bOb_delete_room_by_non_owner_1864@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2022-01-25 16:31:50.412 ***
bOb_delete_room_by_non_owner_1864@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-25 16:31:50.412 ***
bOb_delete_room_by_non_owner_1864@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='462198a1f1b4dcca' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-01-25 16:31:50.412 ***
bOb_delete_room_by_non_owner_1864@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-25 16:31:50.413 ***
bOb_delete_room_by_non_owner_1864@localhost/res1 out
<iq type='set' id='6a56bec1ceebc829cc8de1ea6ad5cd3e'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2022-01-25 16:31:50.413 ***
bOb_delete_room_by_non_owner_1864@localhost/res1 in
<iq id='6a56bec1ceebc829cc8de1ea6ad5cd3e' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>bOb_delete_room_by_non_owner_1864@localhost/res1</jid>
</bind>
</iq>
*** User 2022-01-25 16:31:50.413 ***
bOb_delete_room_by_non_owner_1864@localhost/res1 out
<iq type='set' id='e3f96a2fb3897f49831374ce6f1b58be'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-25 16:31:50.413 ***
bOb_delete_room_by_non_owner_1864@localhost/res1 in
<iq type='result' id='e3f96a2fb3897f49831374ce6f1b58be'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-25 16:31:50.413 ***
bOb_delete_room_by_non_owner_1864@localhost/res1 out
<presence/>
*** User 2022-01-25 16:31:50.415 ***
bOb_delete_room_by_non_owner_1864@localhost/res1 in
<presence from='bOb_delete_room_by_non_owner_1864@localhost/res1' to='bob_delete_room_by_non_owner_1864@localhost/res1' xml:lang='en'/>
*** User 2022-01-25 16:31:50.415 ***
kate_delete_room_by_non_owner_1864@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-25 16:31:50.416 ***
kate_delete_room_by_non_owner_1864@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='4416cad263c9af01' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-01-25 16:31:50.416 ***
kate_delete_room_by_non_owner_1864@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-25 16:31:50.416 ***
kate_delete_room_by_non_owner_1864@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGthdGVfZGVsZXRlX3Jvb21fYnlfbm9uX293bmVyXzE4NjQAbWFrcm93ZTtw</auth>
*** User 2022-01-25 16:31:50.417 ***
kate_delete_room_by_non_owner_1864@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2022-01-25 16:31:50.417 ***
kate_delete_room_by_non_owner_1864@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-25 16:31:50.417 ***
kate_delete_room_by_non_owner_1864@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='70c101d2ef3cd5ad' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-01-25 16:31:50.417 ***
kate_delete_room_by_non_owner_1864@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-25 16:31:50.417 ***
kate_delete_room_by_non_owner_1864@localhost/res1 out
<iq type='set' id='8b523d00f39913052b903f84896293e0'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2022-01-25 16:31:50.418 ***
kate_delete_room_by_non_owner_1864@localhost/res1 in
<iq id='8b523d00f39913052b903f84896293e0' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>kate_delete_room_by_non_owner_1864@localhost/res1</jid>
</bind>
</iq>
*** User 2022-01-25 16:31:50.418 ***
kate_delete_room_by_non_owner_1864@localhost/res1 out
<iq type='set' id='fca493f39891441adb052e2cf87829c1'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-25 16:31:50.418 ***
kate_delete_room_by_non_owner_1864@localhost/res1 in
<iq type='result' id='fca493f39891441adb052e2cf87829c1'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-25 16:31:50.418 ***
kate_delete_room_by_non_owner_1864@localhost/res1 out
<presence/>
*** User 2022-01-25 16:31:50.420 ***
kate_delete_room_by_non_owner_1864@localhost/res1 in
<presence from='kate_delete_room_by_non_owner_1864@localhost/res1' to='kate_delete_room_by_non_owner_1864@localhost/res1' xml:lang='en'/>
*** User 2022-01-25 16:31:50.420 ***
alicE_delete_room_by_non_owner_1864@localhost/res1 out
<iq type='set' id='0b9037a2da17f87f21769dfd50ac1c7e' 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_1864@localhost</user>
<user affiliation='member'>kate_delete_room_by_non_owner_1864@localhost</user>
</occupants>
</query>
</iq>
*** User 2022-01-25 16:31:50.427 ***
alicE_delete_room_by_non_owner_1864@localhost/res1 in
<message from='1643-128310-422640@muclight.localhost' to='alice_delete_room_by_non_owner_1864@localhost' id='0b9037a2da17f87f21769dfd50ac1c7e' type='groupchat'>
<x xmlns='urn:xmpp:muclight:0#affiliations'>
<version>1643-128310-422630</version>
<user affiliation='owner'>alice_delete_room_by_non_owner_1864@localhost</user>
</x>
<body/>
</message>
*** User 2022-01-25 16:31:50.427 ***
alicE_delete_room_by_non_owner_1864@localhost/res1 in
<iq from='muclight.localhost' to='alicE_delete_room_by_non_owner_1864@localhost/res1' id='0b9037a2da17f87f21769dfd50ac1c7e' type='result'/>
*** User 2022-01-25 16:31:50.427 ***
bOb_delete_room_by_non_owner_1864@localhost/res1 in
<message from='1643-128310-422640@muclight.localhost' to='bob_delete_room_by_non_owner_1864@localhost' id='0b9037a2da17f87f21769dfd50ac1c7e' type='groupchat'>
<x xmlns='urn:xmpp:muclight:0#affiliations'>
<version>1643-128310-422630</version>
<user affiliation='member'>bob_delete_room_by_non_owner_1864@localhost</user>
</x>
<body/>
</message>
*** User 2022-01-25 16:31:50.427 ***
kate_delete_room_by_non_owner_1864@localhost/res1 in
<message from='1643-128310-422640@muclight.localhost' to='kate_delete_room_by_non_owner_1864@localhost' id='0b9037a2da17f87f21769dfd50ac1c7e' type='groupchat'>
<x xmlns='urn:xmpp:muclight:0#affiliations'>
<version>1643-128310-422630</version>
<user affiliation='member'>kate_delete_room_by_non_owner_1864@localhost</user>
</x>
<body/>
</message>
*** User 2022-01-25 16:31:50.448 ***
REST request fails:
Code: 403
Req: {<0.28598.1>,
<<"/api/muc-lights/muclight.localhost/wonderland/bOb_delete_room_by_non_owner_1864@localhost/management">>,
<<"DELETE">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"fa8869889f2a3dd8">>}],
<<>>}
Result: {{<<"403">>,<<"Forbidden">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Tue, 25 Jan 2022 16:31:50 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"28">>}],
<<"you can not delete this room">>,159,20248}
Params: #{body => <<>>,method => <<"DELETE">>,
path =>
<<"/api/muc-lights/muclight.localhost/wonderland/bOb_delete_room_by_non_owner_1864@localhost/management">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-01-25 16:31:50.448 ***
kate_delete_room_by_non_owner_1864@localhost/res1 out
</stream:stream>
*** User 2022-01-25 16:31:50.448 ***
kate_delete_room_by_non_owner_1864@localhost/res1 in
</stream:stream>
*** User 2022-01-25 16:31:50.448 ***
bOb_delete_room_by_non_owner_1864@localhost/res1 out
</stream:stream>
*** User 2022-01-25 16:31:50.449 ***
bOb_delete_room_by_non_owner_1864@localhost/res1 in
</stream:stream>
*** User 2022-01-25 16:31:50.449 ***
alicE_delete_room_by_non_owner_1864@localhost/res1 out
</stream:stream>
*** User 2022-01-25 16:31:50.449 ***
alicE_delete_room_by_non_owner_1864@localhost/res1 in
</stream:stream>
=== Ended at 2022-01-25 16:31:50
=== successfully completed test case
=== === Returned value: ok