=== Test case: rest_client_SUITE:user_removal_errors/1 (click for source code)
=== Config value:
[{watchdog,<0.83834.0>},
{muc_light_host,<<"muclight.localhost">>},
{mam_backend,rdbms},
{preset,"odbc_mssql_mnesia"},
{mim_data_dir,"/home/circleci/project/big_tests/tests/rest_client_SUITE_data"},
{tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@e84896a28784.2023-12-20_12.31.47/big_tests.tests.rest_client_SUITE.logs/run.2023-12-20_12.48.35/rest_client_suite.user_removal_errors.89348.html"},
{tc_group_properties,[{name,muc},parallel]},
{tc_group_path,[]},
{data_dir,"/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/rest_client_SUITE_data/"},
{priv_dir,"/home/circleci/project/big_tests/ct_report/ct_run.test@e84896a28784.2023-12-20_12.31.47/big_tests.tests.rest_client_SUITE.logs/run.2023-12-20_12.48.35/log_private/"},
{{saved_modules,mongooseim@localhost,<<"localhost">>},
#{mod_vcard =>
#{matches => 30,
host => {prefix,<<"vjud.">>},
search => true,iqdisc => parallel,backend => rdbms},
mod_roster =>
#{iqdisc => one_queue,backend => rdbms,versioning => false,
store_current_id => false},
mod_sic => #{iqdisc => one_queue},
mod_amp => #{},
mod_register =>
#{access => register,iqdisc => one_queue,
registration_watchers => [],password_strength => 0,
ip_access => [{allow,"127.0.0.0/8"},{deny,"0.0.0.0/0"}]},
mod_disco =>
#{iqdisc => one_queue,users_can_see_hidden_services => false,
server_info => [],extra_domains => []},
mod_presence => #{},
mod_stream_management =>
#{buffer => true,ack => true,backend => mnesia,
stale_h =>
#{enabled => false,repeat_after => 1800,geriatric => 3600},
buffer_max => 100,ack_freq => 1,resume_timeout => 600},
mod_adhoc => #{iqdisc => one_queue,report_commands_node => false},
mod_cache_users =>
#{strategy => fifo,number_of_segments => 5,time_to_live => 2},
mod_bosh =>
#{backend => mnesia,inactivity => 30,max_pause => 120,
max_wait => infinity,server_acks => false},
mod_carboncopy => #{iqdisc => no_queue}}}]
=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@e84896a28784.2023-12-20_12.31.47"
=== Started at 2023-12-20 12:48:36
*** User 2023-12-20 12:48:36.441 ***🔗
alicE_user_removal_errors_3064@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2023-12-20 12:48:36.442 ***🔗
alicE_user_removal_errors_3064@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='c703dfd449deb97b' from='localhost' version='1.0' xml:lang='en'>
*** User 2023-12-20 12:48:36.442 ***🔗
alicE_user_removal_errors_3064@localhost/res1 in
<stream:features>
<register xmlns='http://jabber.org/features/iq-register'/>
<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
<mechanism>SCRAM-SHA-256</mechanism>
<mechanism>PLAIN</mechanism>
</mechanisms>
<amp xmlns='http://jabber.org/feature/amp'/>
<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>
*** User 2023-12-20 12:48:36.442 ***🔗
alicE_user_removal_errors_3064@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX3VzZXJfcmVtb3ZhbF9lcnJvcnNfMzA2NABtYXR5Z3J5c2E=</auth>
*** User 2023-12-20 12:48:36.445 ***🔗
alicE_user_removal_errors_3064@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2023-12-20 12:48:36.446 ***🔗
alicE_user_removal_errors_3064@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2023-12-20 12:48:36.447 ***🔗
alicE_user_removal_errors_3064@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='8694e92f4e61e799' from='localhost' version='1.0' xml:lang='en' to='alice_user_removal_errors_3064@localhost'>
*** User 2023-12-20 12:48:36.447 ***🔗
alicE_user_removal_errors_3064@localhost/res1 in
<stream:features>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
<register xmlns='http://jabber.org/features/iq-register'/>
<amp xmlns='http://jabber.org/feature/amp'/>
<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>
*** User 2023-12-20 12:48:36.447 ***🔗
alicE_user_removal_errors_3064@localhost/res1 out
<iq type='set' id='67321cba46f084eea2b90d744ee18c53'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2023-12-20 12:48:36.448 ***🔗
alicE_user_removal_errors_3064@localhost/res1 in
<iq id='67321cba46f084eea2b90d744ee18c53' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>alice_user_removal_errors_3064@localhost/res1</jid>
</bind>
</iq>
*** User 2023-12-20 12:48:36.448 ***🔗
alice_user_removal_errors_3064@localhost/res1 out
<iq type='set' id='898f612168e97910e1881258ba56c72d'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2023-12-20 12:48:36.449 ***🔗
alice_user_removal_errors_3064@localhost/res1 in
<iq from='localhost' to='alice_user_removal_errors_3064@localhost/res1' id='898f612168e97910e1881258ba56c72d' type='result'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2023-12-20 12:48:36.451 ***🔗
alice_user_removal_errors_3064@localhost/res1 out
<presence/>
*** User 2023-12-20 12:48:36.507 ***🔗
alice_user_removal_errors_3064@localhost/res1 in
<presence from='alice_user_removal_errors_3064@localhost/res1' to='alice_user_removal_errors_3064@localhost/res1'/>
*** User 2023-12-20 12:48:36.508 ***🔗
bOb_user_removal_errors_3064@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2023-12-20 12:48:36.510 ***🔗
bOb_user_removal_errors_3064@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='981b3afee1a8706a' from='localhost' version='1.0' xml:lang='en'>
*** User 2023-12-20 12:48:36.510 ***🔗
bOb_user_removal_errors_3064@localhost/res1 in
<stream:features>
<register xmlns='http://jabber.org/features/iq-register'/>
<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
<mechanism>SCRAM-SHA-256</mechanism>
<mechanism>PLAIN</mechanism>
</mechanisms>
<amp xmlns='http://jabber.org/feature/amp'/>
<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>
*** User 2023-12-20 12:48:36.510 ***🔗
bOb_user_removal_errors_3064@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl91c2VyX3JlbW92YWxfZXJyb3JzXzMwNjQAbWFrcm9saWth</auth>
*** User 2023-12-20 12:48:36.513 ***🔗
bOb_user_removal_errors_3064@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2023-12-20 12:48:36.513 ***🔗
bOb_user_removal_errors_3064@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2023-12-20 12:48:36.514 ***🔗
bOb_user_removal_errors_3064@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='1a88d8fe9903f1a2' from='localhost' version='1.0' xml:lang='en' to='bob_user_removal_errors_3064@localhost'>
*** User 2023-12-20 12:48:36.514 ***🔗
bOb_user_removal_errors_3064@localhost/res1 in
<stream:features>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
<register xmlns='http://jabber.org/features/iq-register'/>
<amp xmlns='http://jabber.org/feature/amp'/>
<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>
*** User 2023-12-20 12:48:36.514 ***🔗
bOb_user_removal_errors_3064@localhost/res1 out
<iq type='set' id='2a4af098416021a18b66e24a5783351a'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2023-12-20 12:48:36.515 ***🔗
bOb_user_removal_errors_3064@localhost/res1 in
<iq id='2a4af098416021a18b66e24a5783351a' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>bob_user_removal_errors_3064@localhost/res1</jid>
</bind>
</iq>
*** User 2023-12-20 12:48:36.515 ***🔗
bob_user_removal_errors_3064@localhost/res1 out
<iq type='set' id='da89105037326ead1276fd66c5de80dd'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2023-12-20 12:48:36.516 ***🔗
bob_user_removal_errors_3064@localhost/res1 in
<iq from='localhost' to='bob_user_removal_errors_3064@localhost/res1' id='da89105037326ead1276fd66c5de80dd' type='result'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2023-12-20 12:48:36.516 ***🔗
bob_user_removal_errors_3064@localhost/res1 out
<presence/>
*** User 2023-12-20 12:48:36.520 ***🔗
bob_user_removal_errors_3064@localhost/res1 in
<presence from='bob_user_removal_errors_3064@localhost/res1' to='bob_user_removal_errors_3064@localhost/res1'/>
*** User 2023-12-20 12:48:36.616 ***🔗
REST request:
Code: 201
Req: {<0.84189.0>,<<"/api/rooms">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"8ddd420d7e8e5443">>},
{<<"authorization">>,
<<"Basic YWxpY2VfdXNlcl9yZW1vdmFsX2Vycm9yc18zMDY0QGxvY2FsaG9zdDptYXR5Z3J5c2E=">>}],
<<"{\"subject\":\"This room subject\",\"name\":\"new_room_name\"}">>}
Result: {{<<"201">>,<<"Created">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Wed, 20 Dec 2023 12:48:36 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"26">>}],
<<"{\"id\":\"1703-76516-537609\"}">>,155,82863}
Params: #{path => <<"/api/rooms">>,
server => #{node => mongooseim@localhost},
method => <<"POST">>,role => client,
creds =>
{<<"alice_user_removal_errors_3064@localhost">>,<<"matygrysa">>},
body =>
<<"{\"subject\":\"This room subject\",\"name\":\"new_room_name\"}">>,
return_headers => true}
*** User 2023-12-20 12:48:36.723 ***🔗
REST request:
Code: 204
Req: {<0.84330.0>,<<"/api/rooms/1703-76516-537609/users">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"4299fc24ac0dd6c4">>},
{<<"authorization">>,
<<"Basic YWxpY2VfdXNlcl9yZW1vdmFsX2Vycm9yc18zMDY0QGxvY2FsaG9zdDptYXR5Z3J5c2E=">>}],
<<"{\"user\":\"bob_user_removal_errors_3064@localhost\"}">>}
Result: {{<<"204">>,<<"No Content">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Wed, 20 Dec 2023 12:48:36 GMT">>}],
<<>>,80,98737}
Params: #{path => <<"/api/rooms/1703-76516-537609/users">>,
server => #{node => mongooseim@localhost},
method => <<"POST">>,role => client,
creds =>
{<<"alice_user_removal_errors_3064@localhost">>,<<"matygrysa">>},
body => <<"{\"user\":\"bob_user_removal_errors_3064@localhost\"}">>,
return_headers => true}
*** User 2023-12-20 12:48:36.724 ***🔗
bob_user_removal_errors_3064@localhost/res1 in
<message from='1703-76516-537609@muclight.localhost' to='bob_user_removal_errors_3064@localhost' id='3ab12c39-a022-40f8-948c-db79fac691dd' type='groupchat'>
<x xmlns='urn:xmpp:muclight:0#affiliations'>
<version>1703-76516-705260</version>
<user affiliation='member'>bob_user_removal_errors_3064@localhost</user>
</x>
<body/>
</message>
*** User 2023-12-20 12:48:36.724 ***🔗
alice_user_removal_errors_3064@localhost/res1 in
<message from='1703-76516-537609@muclight.localhost' to='alice_user_removal_errors_3064@localhost' id='3ab12c39-a022-40f8-948c-db79fac691dd' type='groupchat'>
<x xmlns='urn:xmpp:muclight:0#affiliations'>
<prev-version>1703-76516-537599</prev-version>
<version>1703-76516-705260</version>
<user affiliation='member'>bob_user_removal_errors_3064@localhost</user>
</x>
<body/>
<stanza-id by='1703-76516-537609@muclight.localhost' id='C37GCR68U3O1' xmlns='urn:xmpp:sid:0'/>
</message>
*** User 2023-12-20 12:48:36.733 ***🔗
REST request fails:
Code: 400
Req: {<0.84537.0>,<<"/api/rooms/1703-76516-537609/users/@invalid">>,
<<"DELETE">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"fc8a1ac3ee36f69e">>},
{<<"authorization">>,
<<"Basic YWxpY2VfdXNlcl9yZW1vdmFsX2Vycm9yc18zMDY0QGxvY2FsaG9zdDptYXR5Z3J5c2E=">>}],
<<>>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Wed, 20 Dec 2023 12:48:36 GMT">>},
{<<"content-type">>,<<"text/html">>},
{<<"content-length">>,<<"28">>}],
<<"\"Invalid user JID: @invalid\"">>,154,1934}
Params: #{path => <<"/api/rooms/1703-76516-537609/users/@invalid">>,
server => #{node => mongooseim@localhost},
method => <<"DELETE">>,role => client,
creds =>
{<<"alice_user_removal_errors_3064@localhost">>,<<"matygrysa">>},
body => <<>>,return_headers => true}
*** User 2023-12-20 12:48:36.806 ***🔗
REST request fails:
Code: 400
Req: {<0.84573.0>,<<"/api/rooms/1703-76516-537609/users/">>,<<"DELETE">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"796d753cd78f29df">>},
{<<"authorization">>,
<<"Basic YWxpY2VfdXNlcl9yZW1vdmFsX2Vycm9yc18zMDY0QGxvY2FsaG9zdDptYXR5Z3J5c2E=">>}],
<<>>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Wed, 20 Dec 2023 12:48:36 GMT">>},
{<<"content-type">>,<<"text/html">>},
{<<"content-length">>,<<"13">>}],
<<"\"Missing JID\"">>,139,1775}
Params: #{path => <<"/api/rooms/1703-76516-537609/users/">>,
server => #{node => mongooseim@localhost},
method => <<"DELETE">>,role => client,
creds =>
{<<"alice_user_removal_errors_3064@localhost">>,<<"matygrysa">>},
body => <<>>,return_headers => true}
*** User 2023-12-20 12:48:36.820 ***🔗
REST request fails:
Code: 403
Req: {<0.84594.0>,
<<"/api/rooms/1703-76516-537609/users/alice_user_removal_errors_3064@localhost">>,
<<"DELETE">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"2470f6ccbc374848">>},
{<<"authorization">>,
<<"Basic Ym9iX3VzZXJfcmVtb3ZhbF9lcnJvcnNfMzA2NEBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
<<>>}
Result: {{<<"403">>,<<"Forbidden">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Wed, 20 Dec 2023 12:48:36 GMT">>},
{<<"content-type">>,<<"text/html">>},
{<<"content-length">>,<<"60">>}],
<<"\"Given user does not have permission to change affiliations\"">>,
184,6856}
Params: #{path =>
<<"/api/rooms/1703-76516-537609/users/alice_user_removal_errors_3064@localhost">>,
server => #{node => mongooseim@localhost},
method => <<"DELETE">>,role => client,
creds =>
{<<"bob_user_removal_errors_3064@localhost">>,<<"makrolika">>},
body => <<>>,return_headers => true}
*** User 2023-12-20 12:48:36.829 ***🔗
REST request fails:
Code: 404
Req: {<0.84628.0>,
<<"/api/rooms/badroom/users/bob_user_removal_errors_3064@localhost">>,
<<"DELETE">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"1c14808058f4939b">>},
{<<"authorization">>,
<<"Basic YWxpY2VfdXNlcl9yZW1vdmFsX2Vycm9yc18zMDY0QGxvY2FsaG9zdDptYXR5Z3J5c2E=">>}],
<<>>}
Result: {{<<"404">>,<<"Not Found">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Wed, 20 Dec 2023 12:48:36 GMT">>},
{<<"content-type">>,<<"text/html">>},
{<<"content-length">>,<<"16">>}],
<<"\"Room not found\"">>,140,4040}
Params: #{path =>
<<"/api/rooms/badroom/users/bob_user_removal_errors_3064@localhost">>,
server => #{node => mongooseim@localhost},
method => <<"DELETE">>,role => client,
creds =>
{<<"alice_user_removal_errors_3064@localhost">>,<<"matygrysa">>},
body => <<>>,return_headers => true}
*** User 2023-12-20 12:48:36.830 ***🔗
bob_user_removal_errors_3064@localhost/res1 out
</stream:stream>
*** User 2023-12-20 12:48:36.830 ***🔗
bob_user_removal_errors_3064@localhost/res1 in
</stream:stream>
*** User 2023-12-20 12:48:36.831 ***🔗
alice_user_removal_errors_3064@localhost/res1 out
</stream:stream>
*** User 2023-12-20 12:48:36.831 ***🔗
alice_user_removal_errors_3064@localhost/res1 in
</stream:stream>
=== Ended at 2023-12-20 12:48:36
=== successfully completed test case
=== === Returned value: ok