=== Test case: rest_SUITE:user_can_be_registered_and_removed/1 (click for source code)
=== Config value:
[{watchdog,<0.10444.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,"pgsql_mnesia"},
{tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@43f5552376e6.2022-03-04_11.16.18/big_tests.tests.rest_SUITE.logs/run.2022-03-04_11.27.36/rest_suite.user_can_be_registered_and_removed.115459.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@43f5552376e6.2022-03-04_11.16.18/big_tests.tests.rest_SUITE.logs/run.2022-03-04_11.27.36/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@43f5552376e6.2022-03-04_11.16.18"
=== Started at 2022-03-04 11:27:36
*** User 2022-03-04 11:27:37.014 ***
REST request:
Code: 200
Req: {<0.10590.2>,<<"/api/users/localhost">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"56c2fe970e061cad">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Fri, 04 Mar 2022 11:27:36 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"35">>}],
<<"[\"alice@localhost\",\"bob@localhost\"]">>,159,1731}
Params: #{body => <<>>,method => <<"GET">>,path => <<"/api/users/localhost">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-03-04 11:27:37.017 ***
REST request:
Code: 201
Req: {<0.10598.2>,<<"/api/users/localhost">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"923116d10a0079a6">>}],
<<"{\"username\":\"mike\",\"password\":\"nicniema\"}">>}
Result: {{<<"201">>,<<"Created">>},
[{<<"server">>,<<"Cowboy">>},
{<<"location">>,
<<"http://localhost:8088/api/users/localhost/User mike@localhost successfully registered">>},
{<<"date">>,<<"Fri, 04 Mar 2022 11:27:36 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"43">>}],
<<"User mike@localhost successfully registered">>,269,1523}
Params: #{body => <<"{\"username\":\"mike\",\"password\":\"nicniema\"}">>,
method => <<"POST">>,path => <<"/api/users/localhost">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-03-04 11:27:37.020 ***
REST request:
Code: 200
Req: {<0.10601.2>,<<"/api/users/localhost">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"ec698106f5eac6a3">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Fri, 04 Mar 2022 11:27:36 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"389">>}],
<<"[\"alice@localhost\",\"alice_messages_are_archived_1996@localhost\",\"alice_messages_are_sent_and_received_1994@localhost\",\"alice_messages_can_be_paginated_1995@localhost\",\"alice_messages_error_handling_1992@localhost\",\"alice_session_can_be_kicked_1993@localhost\",\"bob@localhost\",\"bob_messages_are_sent_and_received_1994@localhost\",\"bob_messages_error_handling_1992@localhost\",\"mike@localhost\"]">>,
514,1062}
Params: #{body => <<>>,method => <<"GET">>,path => <<"/api/users/localhost">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-03-04 11:27:37.027 ***
REST request fails:
Code: 403
Req: {<0.10607.2>,<<"/api/users/localhost">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"915eb7bef91f5cd4">>}],
<<"{\"username\":\"mike\",\"password\":\"nicniema\"}">>}
Result: {{<<"403">>,<<"Forbidden">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Fri, 04 Mar 2022 11:27:36 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"67">>}],
<<"User mike@localhost already registered at node mongooseim@localhost">>,
198,5961}
Params: #{body => <<"{\"username\":\"mike\",\"password\":\"nicniema\"}">>,
method => <<"POST">>,path => <<"/api/users/localhost">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-03-04 11:27:37.051 ***
REST request:
Code: 204
Req: {<0.10624.2>,<<"/api/users/localhost/mike">>,<<"DELETE">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"c9360aa49daca010">>}],
<<>>}
Result: {{<<"204">>,<<"No Content">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Fri, 04 Mar 2022 11:27:36 GMT">>},
{<<"content-type">>,<<"application/json">>}],
<<>>,112,22492}
Params: #{body => <<>>,method => <<"DELETE">>,
path => <<"/api/users/localhost/mike">>,return_headers => true,
role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-03-04 11:27:37.054 ***
REST request:
Code: 200
Req: {<0.10673.2>,<<"/api/users/localhost">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"72fdb86fe8adb5f0">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Fri, 04 Mar 2022 11:27:36 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"566">>}],
<<"[\"alice@localhost\",\"alice_messages_are_archived_1996@localhost\",\"alice_messages_are_sent_and_received_1994@localhost\",\"alice_messages_can_be_paginated_1995@localhost\",\"alice_messages_error_handling_1992@localhost\",\"alice_session_can_be_kicked_1993@localhost\",\"alice_stanzas_are_sent_and_received_1997@localhost\",\"bob@localhost\",\"bob_messages_are_archived_1996@localhost\",\"bob_messages_are_sent_and_received_1994@localhost\",\"bob_messages_can_be_paginated_1995@localhost\",\"bob_messages_error_handling_1992@localhost\",\"bob_stanzas_are_sent_and_received_1997@localhost\"]">>,
691,1568}
Params: #{body => <<>>,method => <<"GET">>,path => <<"/api/users/localhost">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-03-04 11:27:37.056 ***
REST request fails:
Code: 400
Req: {<0.10683.2>,<<"/api/users/localhost">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"e6057199615a5af1">>}],
<<"{\"username\":\"m@ke\",\"password\":\"nicniema\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Fri, 04 Mar 2022 11:27:36 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"26">>}],
<<"Invalid JID m@ke@localhost">>,159,1053}
Params: #{body => <<"{\"username\":\"m@ke\",\"password\":\"nicniema\"}">>,
method => <<"POST">>,path => <<"/api/users/localhost">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-03-04 11:27:37.058 ***
REST request fails:
Code: 400
Req: {<0.10689.2>,<<"/api/users/localhost/@mike">>,<<"DELETE">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"0d6df4ac4cd445a2">>}],
<<>>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Fri, 04 Mar 2022 11:27:36 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"11">>}],
<<"Invalid JID">>,144,953}
Params: #{body => <<>>,method => <<"DELETE">>,
path => <<"/api/users/localhost/@mike">>,return_headers => true,
role => admin,
server => #{node => mongooseim@localhost}}
=== Ended at 2022-03-04 11:27:37
=== successfully completed test case
=== === Returned value: ok