=== Test case: rest_SUITE:user_can_be_registered_and_removed/1 (click for source code)
=== Config value:
[{watchdog,<0.25535.1>},
{{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@7a520fcf4274.2022-02-02_15.07.36/big_tests.tests.rest_SUITE.logs/run.2022-02-02_15.14.56/rest_suite.user_can_be_registered_and_removed.102275.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@7a520fcf4274.2022-02-02_15.07.36/big_tests.tests.rest_SUITE.logs/run.2022-02-02_15.14.56/log_private/"},
{escalus_users,[{alice,[{username,<<"alicE">>},
{server,<<"domain.example.com">>},
{host,<<"localhost">>},
{password,<<"matygrysa">>}]},
{bob,[{username,<<"bOb">>},
{server,<<"domain.example.com">>},
{host,<<"localhost">>},
{password,<<"makrolika">>}]}]}]
=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@7a520fcf4274.2022-02-02_15.07.36"
=== Started at 2022-02-02 15:14:56
*** User 2022-02-02 15:14:56.943 ***
REST request:
Code: 200
Req: {<0.25673.1>,<<"/api/users/domain.example.com">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"6717ccdc779a6d67">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Wed, 02 Feb 2022 15:14:56 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"53">>}],
<<"[\"alice@domain.example.com\",\"bob@domain.example.com\"]">>,177,
1086}
Params: #{body => <<>>,method => <<"GET">>,
path => <<"/api/users/domain.example.com">>,return_headers => true,
role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-02-02 15:14:56.947 ***
REST request:
Code: 201
Req: {<0.25680.1>,<<"/api/users/domain.example.com">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"3e1a80c5e802af01">>}],
<<"{\"username\":\"mike\",\"password\":\"nicniema\"}">>}
Result: {{<<"201">>,<<"Created">>},
[{<<"server">>,<<"Cowboy">>},
{<<"location">>,
<<"http://localhost:8088/api/users/domain.example.com/User mike@domain.example.com successfully registered">>},
{<<"date">>,<<"Wed, 02 Feb 2022 15:14:56 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"52">>}],
<<"User mike@domain.example.com successfully registered">>,296,3042}
Params: #{body => <<"{\"username\":\"mike\",\"password\":\"nicniema\"}">>,
method => <<"POST">>,path => <<"/api/users/domain.example.com">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-02-02 15:14:56.950 ***
REST request:
Code: 200
Req: {<0.25690.1>,<<"/api/users/domain.example.com">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"eab123d39e6ac7cf">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Wed, 02 Feb 2022 15:14:56 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"189">>}],
<<"[\"alice@domain.example.com\",\"alice_messages_error_handling_1601@domain.example.com\",\"alice_session_can_be_kicked_1600@domain.example.com\",\"bob@domain.example.com\",\"mike@domain.example.com\"]">>,
314,614}
Params: #{body => <<>>,method => <<"GET">>,
path => <<"/api/users/domain.example.com">>,return_headers => true,
role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-02-02 15:14:56.954 ***
REST request fails:
Code: 403
Req: {<0.25693.1>,<<"/api/users/domain.example.com">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"c12295a72af4384b">>}],
<<"{\"username\":\"mike\",\"password\":\"nicniema\"}">>}
Result: {{<<"403">>,<<"Forbidden">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Wed, 02 Feb 2022 15:14:56 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"76">>}],
<<"User mike@domain.example.com already registered at node mongooseim@localhost">>,
207,3864}
Params: #{body => <<"{\"username\":\"mike\",\"password\":\"nicniema\"}">>,
method => <<"POST">>,path => <<"/api/users/domain.example.com">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-02-02 15:14:56.965 ***
REST request:
Code: 204
Req: {<0.25703.1>,<<"/api/users/domain.example.com/mike">>,<<"DELETE">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"32e263597f875ac0">>}],
<<>>}
Result: {{<<"204">>,<<"No Content">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Wed, 02 Feb 2022 15:14:56 GMT">>},
{<<"content-type">>,<<"application/json">>}],
<<>>,112,9124}
Params: #{body => <<>>,method => <<"DELETE">>,
path => <<"/api/users/domain.example.com/mike">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-02-02 15:14:56.968 ***
REST request:
Code: 200
Req: {<0.25746.1>,<<"/api/users/domain.example.com">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"31d74b0e89243eb5">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Wed, 02 Feb 2022 15:14:56 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"683">>}],
<<"[\"alice@domain.example.com\",\"alice_messages_are_archived_1604@domain.example.com\",\"alice_messages_are_sent_and_received_1602@domain.example.com\",\"alice_messages_can_be_paginated_1605@domain.example.com\",\"alice_messages_error_handling_1601@domain.example.com\",\"alice_session_can_be_kicked_1600@domain.example.com\",\"alice_stanzas_are_sent_and_received_1603@domain.example.com\",\"bob@domain.example.com\",\"bob_messages_are_archived_1604@domain.example.com\",\"bob_messages_are_sent_and_received_1602@domain.example.com\",\"bob_messages_can_be_paginated_1605@domain.example.com\",\"bob_messages_error_handling_1601@domain.example.com\",\"bob_stanzas_are_sent_and_received_1603@domain.example.com\"]">>,
808,1391}
Params: #{body => <<>>,method => <<"GET">>,
path => <<"/api/users/domain.example.com">>,return_headers => true,
role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-02-02 15:14:56.970 ***
REST request fails:
Code: 400
Req: {<0.25754.1>,<<"/api/users/domain.example.com">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"fda2c1789175405f">>}],
<<"{\"username\":\"m@ke\",\"password\":\"nicniema\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Wed, 02 Feb 2022 15:14:56 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"35">>}],
<<"Invalid JID m@ke@domain.example.com">>,168,862}
Params: #{body => <<"{\"username\":\"m@ke\",\"password\":\"nicniema\"}">>,
method => <<"POST">>,path => <<"/api/users/domain.example.com">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-02-02 15:14:56.972 ***
REST request fails:
Code: 400
Req: {<0.25765.1>,<<"/api/users/domain.example.com/@mike">>,<<"DELETE">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"fce0dfddf65c6ac6">>}],
<<>>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Wed, 02 Feb 2022 15:14:56 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"11">>}],
<<"Invalid JID">>,144,709}
Params: #{body => <<>>,method => <<"DELETE">>,
path => <<"/api/users/domain.example.com/@mike">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
=== Ended at 2022-02-02 15:14:56
=== successfully completed test case
=== === Returned value: ok