=== Test case: muc_light_http_api_SUITE:delete_room_by_non_owner/1 (click for source code)
=== Config value:
[{watchdog,<0.2817.1>},
{mim_data_dir,"/home/circleci/project/big_tests/tests/muc_light_http_api_SUITE_data"},
{preset,"internal_mnesia"},
{tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@34a9b6d2516c.2022-01-27_15.25.07/big_tests.tests.muc_light_http_api_SUITE.logs/run.2022-01-27_15.33.34/muc_light_http_api_suite.delete_room_by_non_owner.13956.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@34a9b6d2516c.2022-01-27_15.25.07/big_tests.tests.muc_light_http_api_SUITE.logs/run.2022-01-27_15.33.34/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@34a9b6d2516c.2022-01-27_15.25.07"
=== Started at 2022-01-27 15:33:35
*** User 2022-01-27 15:33:35.039 ***
alicE_delete_room_by_non_owner_1007@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:33:35.040 ***
alicE_delete_room_by_non_owner_1007@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='4109edadeec4c040' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-01-27 15:33:35.040 ***
alicE_delete_room_by_non_owner_1007@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:33:35.040 ***
alicE_delete_room_by_non_owner_1007@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX2RlbGV0ZV9yb29tX2J5X25vbl9vd25lcl8xMDA3AG1hdHlncnlzYQ==</auth>
*** User 2022-01-27 15:33:35.040 ***
alicE_delete_room_by_non_owner_1007@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2022-01-27 15:33:35.040 ***
alicE_delete_room_by_non_owner_1007@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:33:35.040 ***
alicE_delete_room_by_non_owner_1007@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='eeaf7e924b834c93' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-01-27 15:33:35.040 ***
alicE_delete_room_by_non_owner_1007@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:33:35.041 ***
alicE_delete_room_by_non_owner_1007@localhost/res1 out
<iq type='set' id='891aee1f21f55b8a899f43e4892fe323'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2022-01-27 15:33:35.041 ***
alicE_delete_room_by_non_owner_1007@localhost/res1 in
<iq id='891aee1f21f55b8a899f43e4892fe323' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>alicE_delete_room_by_non_owner_1007@localhost/res1</jid>
</bind>
</iq>
*** User 2022-01-27 15:33:35.041 ***
alicE_delete_room_by_non_owner_1007@localhost/res1 out
<iq type='set' id='df26ae988cf4f32f3fd3c205a0a4aaf5'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-27 15:33:35.041 ***
alicE_delete_room_by_non_owner_1007@localhost/res1 in
<iq type='result' id='df26ae988cf4f32f3fd3c205a0a4aaf5'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-27 15:33:35.041 ***
alicE_delete_room_by_non_owner_1007@localhost/res1 out
<presence/>
*** User 2022-01-27 15:33:35.042 ***
alicE_delete_room_by_non_owner_1007@localhost/res1 in
<presence from='alicE_delete_room_by_non_owner_1007@localhost/res1' to='alice_delete_room_by_non_owner_1007@localhost/res1' xml:lang='en'/>
*** User 2022-01-27 15:33:35.042 ***
bOb_delete_room_by_non_owner_1007@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:33:35.043 ***
bOb_delete_room_by_non_owner_1007@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='f4ccf5a04666ebc0' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-01-27 15:33:35.043 ***
bOb_delete_room_by_non_owner_1007@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:33:35.043 ***
bOb_delete_room_by_non_owner_1007@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9kZWxldGVfcm9vbV9ieV9ub25fb3duZXJfMTAwNwBtYWtyb2xpa2E=</auth>
*** User 2022-01-27 15:33:35.043 ***
bOb_delete_room_by_non_owner_1007@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2022-01-27 15:33:35.043 ***
bOb_delete_room_by_non_owner_1007@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:33:35.044 ***
bOb_delete_room_by_non_owner_1007@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='096df94f559c64ee' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-01-27 15:33:35.044 ***
bOb_delete_room_by_non_owner_1007@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:33:35.044 ***
bOb_delete_room_by_non_owner_1007@localhost/res1 out
<iq type='set' id='bca65b3846ac2c000b1aa9b3ee7451c6'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2022-01-27 15:33:35.044 ***
bOb_delete_room_by_non_owner_1007@localhost/res1 in
<iq id='bca65b3846ac2c000b1aa9b3ee7451c6' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>bOb_delete_room_by_non_owner_1007@localhost/res1</jid>
</bind>
</iq>
*** User 2022-01-27 15:33:35.044 ***
bOb_delete_room_by_non_owner_1007@localhost/res1 out
<iq type='set' id='d28681bbaf968dc5854fe8f0f482d61d'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-27 15:33:35.044 ***
bOb_delete_room_by_non_owner_1007@localhost/res1 in
<iq type='result' id='d28681bbaf968dc5854fe8f0f482d61d'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-27 15:33:35.044 ***
bOb_delete_room_by_non_owner_1007@localhost/res1 out
<presence/>
*** User 2022-01-27 15:33:35.045 ***
bOb_delete_room_by_non_owner_1007@localhost/res1 in
<presence from='bOb_delete_room_by_non_owner_1007@localhost/res1' to='bob_delete_room_by_non_owner_1007@localhost/res1' xml:lang='en'/>
*** User 2022-01-27 15:33:35.046 ***
kate_delete_room_by_non_owner_1007@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:33:35.046 ***
kate_delete_room_by_non_owner_1007@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='68095a22906f330d' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-01-27 15:33:35.046 ***
kate_delete_room_by_non_owner_1007@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:33:35.046 ***
kate_delete_room_by_non_owner_1007@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGthdGVfZGVsZXRlX3Jvb21fYnlfbm9uX293bmVyXzEwMDcAbWFrcm93ZTtw</auth>
*** User 2022-01-27 15:33:35.047 ***
kate_delete_room_by_non_owner_1007@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2022-01-27 15:33:35.047 ***
kate_delete_room_by_non_owner_1007@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:33:35.047 ***
kate_delete_room_by_non_owner_1007@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='44c538b1220d8366' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-01-27 15:33:35.047 ***
kate_delete_room_by_non_owner_1007@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:33:35.047 ***
kate_delete_room_by_non_owner_1007@localhost/res1 out
<iq type='set' id='ac71b7e07d31c86fb6e312925c740424'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2022-01-27 15:33:35.048 ***
kate_delete_room_by_non_owner_1007@localhost/res1 in
<iq id='ac71b7e07d31c86fb6e312925c740424' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>kate_delete_room_by_non_owner_1007@localhost/res1</jid>
</bind>
</iq>
*** User 2022-01-27 15:33:35.048 ***
kate_delete_room_by_non_owner_1007@localhost/res1 out
<iq type='set' id='6896e476e55c8a5315a497e12db05bb0'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-27 15:33:35.048 ***
kate_delete_room_by_non_owner_1007@localhost/res1 in
<iq type='result' id='6896e476e55c8a5315a497e12db05bb0'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-27 15:33:35.048 ***
kate_delete_room_by_non_owner_1007@localhost/res1 out
<presence/>
*** User 2022-01-27 15:33:35.049 ***
kate_delete_room_by_non_owner_1007@localhost/res1 in
<presence from='kate_delete_room_by_non_owner_1007@localhost/res1' to='kate_delete_room_by_non_owner_1007@localhost/res1' xml:lang='en'/>
*** User 2022-01-27 15:33:35.049 ***
alicE_delete_room_by_non_owner_1007@localhost/res1 out
<iq type='set' id='ccbbf3c1b7ad687a84358fc92e60020c' 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_1007@localhost</user>
<user affiliation='member'>kate_delete_room_by_non_owner_1007@localhost</user>
</occupants>
</query>
</iq>
*** User 2022-01-27 15:33:35.050 ***
alicE_delete_room_by_non_owner_1007@localhost/res1 in
<message from='1643-297615-49742@muclight.localhost' to='alice_delete_room_by_non_owner_1007@localhost' id='ccbbf3c1b7ad687a84358fc92e60020c' type='groupchat'>
<x xmlns='urn:xmpp:muclight:0#affiliations'>
<version>1643-297615-49708</version>
<user affiliation='owner'>alice_delete_room_by_non_owner_1007@localhost</user>
</x>
<body/>
</message>
*** User 2022-01-27 15:33:35.050 ***
alicE_delete_room_by_non_owner_1007@localhost/res1 in
<iq from='muclight.localhost' to='alicE_delete_room_by_non_owner_1007@localhost/res1' id='ccbbf3c1b7ad687a84358fc92e60020c' type='result'/>
*** User 2022-01-27 15:33:35.050 ***
bOb_delete_room_by_non_owner_1007@localhost/res1 in
<message from='1643-297615-49742@muclight.localhost' to='bob_delete_room_by_non_owner_1007@localhost' id='ccbbf3c1b7ad687a84358fc92e60020c' type='groupchat'>
<x xmlns='urn:xmpp:muclight:0#affiliations'>
<version>1643-297615-49708</version>
<user affiliation='member'>bob_delete_room_by_non_owner_1007@localhost</user>
</x>
<body/>
</message>
*** User 2022-01-27 15:33:35.050 ***
kate_delete_room_by_non_owner_1007@localhost/res1 in
<message from='1643-297615-49742@muclight.localhost' to='kate_delete_room_by_non_owner_1007@localhost' id='ccbbf3c1b7ad687a84358fc92e60020c' type='groupchat'>
<x xmlns='urn:xmpp:muclight:0#affiliations'>
<version>1643-297615-49708</version>
<user affiliation='member'>kate_delete_room_by_non_owner_1007@localhost</user>
</x>
<body/>
</message>
*** User 2022-01-27 15:33:35.052 ***
REST request fails:
Code: 403
Req: {<0.2883.1>,
<<"/api/muc-lights/muclight.localhost/wonderland/bOb_delete_room_by_non_owner_1007@localhost/management">>,
<<"DELETE">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"0b5af0f43189e6a9">>}],
<<>>}
Result: {{<<"403">>,<<"Forbidden">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 27 Jan 2022 15:33:34 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"28">>}],
<<"you can not delete this room">>,159,929}
Params: #{body => <<>>,method => <<"DELETE">>,
path =>
<<"/api/muc-lights/muclight.localhost/wonderland/bOb_delete_room_by_non_owner_1007@localhost/management">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-01-27 15:33:35.053 ***
kate_delete_room_by_non_owner_1007@localhost/res1 out
</stream:stream>
*** User 2022-01-27 15:33:35.053 ***
kate_delete_room_by_non_owner_1007@localhost/res1 in
</stream:stream>
*** User 2022-01-27 15:33:35.053 ***
bOb_delete_room_by_non_owner_1007@localhost/res1 out
</stream:stream>
*** User 2022-01-27 15:33:35.053 ***
bOb_delete_room_by_non_owner_1007@localhost/res1 in
</stream:stream>
*** User 2022-01-27 15:33:35.053 ***
alicE_delete_room_by_non_owner_1007@localhost/res1 out
</stream:stream>
*** User 2022-01-27 15:33:35.053 ***
alicE_delete_room_by_non_owner_1007@localhost/res1 in
</stream:stream>
=== Ended at 2022-01-27 15:33:35
=== successfully completed test case
=== === Returned value: ok