=== Test case: rest_SUITE:user_can_be_registered_and_removed/1 (click for source code)
=== Config value:
[{watchdog,<0.8353.2>},
{{ejabberd_cwd,mongooseim@localhost},
"/home/circleci/project/_build/mim1/rel/mongooseim"},
{mam_backend,rdbms},
{mim_data_dir,"/home/circleci/project/big_tests/tests/rest_SUITE_data"},
{preset,"odbc_mssql_mnesia"},
{tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@43a5deef6262.2022-01-27_15.25.11/big_tests.tests.rest_SUITE.logs/run.2022-01-27_15.36.47/rest_suite.user_can_be_registered_and_removed.119939.html"},
{tc_group_properties,[{name,admin},parallel]},
{tc_group_path,[]},
{data_dir,"/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/rest_SUITE_data/"},
{priv_dir,"/home/circleci/project/big_tests/ct_report/ct_run.test@43a5deef6262.2022-01-27_15.25.11/big_tests.tests.rest_SUITE.logs/run.2022-01-27_15.36.47/log_private/"},
{escalus_users,[{alice,[{username,<<"alicE">>},
{server,<<"localhost">>},
{password,<<"matygrysa">>}]},
{bob,[{username,<<"bOb">>},
{server,<<"localhost">>},
{password,<<"makrolika">>}]}]}]
=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@43a5deef6262.2022-01-27_15.25.11"
=== Started at 2022-01-27 15:36:47
*** User 2022-01-27 15:36:47.967 ***
REST request:
Code: 200
Req: {<0.8505.2>,<<"/api/users/localhost">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"54ccb8194a395512">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 27 Jan 2022 15:36:47 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"80">>}],
<<"[\"alice@localhost\",\"alice_session_can_be_kicked_2141@localhost\",\"bob@localhost\"]">>,
204,1641}
Params: #{body => <<>>,method => <<"GET">>,path => <<"/api/users/localhost">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-01-27 15:36:47.971 ***
REST request:
Code: 201
Req: {<0.8508.2>,<<"/api/users/localhost">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"d8a11ab4c43c41dd">>}],
<<"{\"username\":\"mike\",\"password\":\"nicniema\"}">>}
Result: {{<<"201">>,<<"Created">>},
[{<<"server">>,<<"Cowboy">>},
{<<"location">>,
<<"http://localhost:8088/api/users/localhost/User mike@localhost successfully registered">>},
{<<"date">>,<<"Thu, 27 Jan 2022 15:36:47 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"43">>}],
<<"User mike@localhost successfully registered">>,269,3018}
Params: #{body => <<"{\"username\":\"mike\",\"password\":\"nicniema\"}">>,
method => <<"POST">>,path => <<"/api/users/localhost">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-01-27 15:36:47.974 ***
REST request:
Code: 200
Req: {<0.8515.2>,<<"/api/users/localhost">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"7d66f303875e9f35">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 27 Jan 2022 15:36:47 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"448">>}],
<<"[\"alice@localhost\",\"alice_messages_are_archived_2146@localhost\",\"alice_messages_are_sent_and_received_2142@localhost\",\"alice_messages_can_be_paginated_2145@localhost\",\"alice_messages_error_handling_2144@localhost\",\"alice_session_can_be_kicked_2141@localhost\",\"alice_stanzas_are_sent_and_received_2143@localhost\",\"bob@localhost\",\"bob_messages_are_sent_and_received_2142@localhost\",\"bob_stanzas_are_sent_and_received_2143@localhost\",\"mike@localhost\"]">>,
573,1568}
Params: #{body => <<>>,method => <<"GET">>,path => <<"/api/users/localhost">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-01-27 15:36:47.977 ***
REST request fails:
Code: 403
Req: {<0.8523.2>,<<"/api/users/localhost">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"e6ab68869bc2a798">>}],
<<"{\"username\":\"mike\",\"password\":\"nicniema\"}">>}
Result: {{<<"403">>,<<"Forbidden">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 27 Jan 2022 15:36:47 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"67">>}],
<<"User mike@localhost already registered at node mongooseim@localhost">>,
198,1758}
Params: #{body => <<"{\"username\":\"mike\",\"password\":\"nicniema\"}">>,
method => <<"POST">>,path => <<"/api/users/localhost">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-01-27 15:36:48.045 ***
REST request:
Code: 204
Req: {<0.8532.2>,<<"/api/users/localhost/mike">>,<<"DELETE">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"cb5173e7adff13bc">>}],
<<>>}
Result: {{<<"204">>,<<"No Content">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 27 Jan 2022 15:36:48 GMT">>},
{<<"content-type">>,<<"application/json">>}],
<<>>,112,66387}
Params: #{body => <<>>,method => <<"DELETE">>,
path => <<"/api/users/localhost/mike">>,return_headers => true,
role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-01-27 15:36:48.048 ***
REST request:
Code: 200
Req: {<0.8578.2>,<<"/api/users/localhost">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"f086837d18e22387">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 27 Jan 2022 15:36:48 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"566">>}],
<<"[\"alice@localhost\",\"alice_messages_are_archived_2146@localhost\",\"alice_messages_are_sent_and_received_2142@localhost\",\"alice_messages_can_be_paginated_2145@localhost\",\"alice_messages_error_handling_2144@localhost\",\"alice_session_can_be_kicked_2141@localhost\",\"alice_stanzas_are_sent_and_received_2143@localhost\",\"bob@localhost\",\"bob_messages_are_archived_2146@localhost\",\"bob_messages_are_sent_and_received_2142@localhost\",\"bob_messages_can_be_paginated_2145@localhost\",\"bob_messages_error_handling_2144@localhost\",\"bob_stanzas_are_sent_and_received_2143@localhost\"]">>,
691,2331}
Params: #{body => <<>>,method => <<"GET">>,path => <<"/api/users/localhost">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-01-27 15:36:48.053 ***
REST request fails:
Code: 400
Req: {<0.8592.2>,<<"/api/users/localhost">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"c49bf816df5cccf0">>}],
<<"{\"username\":\"m@ke\",\"password\":\"nicniema\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 27 Jan 2022 15:36:48 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"26">>}],
<<"Invalid JID m@ke@localhost">>,159,2561}
Params: #{body => <<"{\"username\":\"m@ke\",\"password\":\"nicniema\"}">>,
method => <<"POST">>,path => <<"/api/users/localhost">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-01-27 15:36:48.054 ***
REST request fails:
Code: 400
Req: {<0.8599.2>,<<"/api/users/localhost/@mike">>,<<"DELETE">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"e68aac891e31b0fb">>}],
<<>>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 27 Jan 2022 15:36:48 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"11">>}],
<<"Invalid JID">>,144,716}
Params: #{body => <<>>,method => <<"DELETE">>,
path => <<"/api/users/localhost/@mike">>,return_headers => true,
role => admin,
server => #{node => mongooseim@localhost}}
=== Ended at 2022-01-27 15:36:48
=== successfully completed test case
=== === Returned value: ok