=== Test case: rest_SUITE:user_can_be_registered_and_removed/1 (click for source code)
=== Config value:
[{watchdog,<0.27106.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,"odbc_mssql_mnesia"},
{tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@88d84ff17c71.2022-03-04_11.16.52/big_tests.tests.rest_SUITE.logs/run.2022-03-04_11.25.01/rest_suite.user_can_be_registered_and_removed.149250.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@88d84ff17c71.2022-03-04_11.16.52/big_tests.tests.rest_SUITE.logs/run.2022-03-04_11.25.01/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@88d84ff17c71.2022-03-04_11.16.52"
=== Started at 2022-03-04 11:25:01
*** User 2022-03-04 11:25:01.264 ***
REST request:
Code: 200
Req: {<0.27244.1>,<<"/api/users/domain.example.com">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"f688629707c31450">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Fri, 04 Mar 2022 11:25:00 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"53">>}],
<<"[\"alice@domain.example.com\",\"bob@domain.example.com\"]">>,177,
1510}
Params: #{body => <<>>,method => <<"GET">>,
path => <<"/api/users/domain.example.com">>,return_headers => true,
role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-03-04 11:25:01.267 ***
REST request:
Code: 201
Req: {<0.27251.1>,<<"/api/users/domain.example.com">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"8fca613aabe0c12f">>}],
<<"{\"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">>,<<"Fri, 04 Mar 2022 11:25:00 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"52">>}],
<<"User mike@domain.example.com successfully registered">>,296,2135}
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-03-04 11:25:01.269 ***
REST request:
Code: 200
Req: {<0.27261.1>,<<"/api/users/domain.example.com">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"b71e8df6a0f9e024">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Fri, 04 Mar 2022 11:25:00 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"79">>}],
<<"[\"alice@domain.example.com\",\"bob@domain.example.com\",\"mike@domain.example.com\"]">>,
203,1137}
Params: #{body => <<>>,method => <<"GET">>,
path => <<"/api/users/domain.example.com">>,return_headers => true,
role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-03-04 11:25:01.272 ***
REST request fails:
Code: 403
Req: {<0.27263.1>,<<"/api/users/domain.example.com">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"1bbbdbe48facbb9e">>}],
<<"{\"username\":\"mike\",\"password\":\"nicniema\"}">>}
Result: {{<<"403">>,<<"Forbidden">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Fri, 04 Mar 2022 11:25:00 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"76">>}],
<<"User mike@domain.example.com already registered at node mongooseim@localhost">>,
207,2305}
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-03-04 11:25:01.342 ***
REST request:
Code: 204
Req: {<0.27269.1>,<<"/api/users/domain.example.com/mike">>,<<"DELETE">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"b07d545b06bfcd27">>}],
<<>>}
Result: {{<<"204">>,<<"No Content">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Fri, 04 Mar 2022 11:25:00 GMT">>},
{<<"content-type">>,<<"application/json">>}],
<<>>,112,68982}
Params: #{body => <<>>,method => <<"DELETE">>,
path => <<"/api/users/domain.example.com/mike">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-03-04 11:25:01.344 ***
REST request:
Code: 200
Req: {<0.27347.1>,<<"/api/users/domain.example.com">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"ec5d59e66122133b">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Fri, 04 Mar 2022 11:25:00 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"683">>}],
<<"[\"alice@domain.example.com\",\"alice_messages_are_archived_1789@domain.example.com\",\"alice_messages_are_sent_and_received_1786@domain.example.com\",\"alice_messages_can_be_paginated_1790@domain.example.com\",\"alice_messages_error_handling_1788@domain.example.com\",\"alice_session_can_be_kicked_1787@domain.example.com\",\"alice_stanzas_are_sent_and_received_1791@domain.example.com\",\"bob@domain.example.com\",\"bob_messages_are_archived_1789@domain.example.com\",\"bob_messages_are_sent_and_received_1786@domain.example.com\",\"bob_messages_can_be_paginated_1790@domain.example.com\",\"bob_messages_error_handling_1788@domain.example.com\",\"bob_stanzas_are_sent_and_received_1791@domain.example.com\"]">>,
808,1008}
Params: #{body => <<>>,method => <<"GET">>,
path => <<"/api/users/domain.example.com">>,return_headers => true,
role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-03-04 11:25:01.346 ***
REST request fails:
Code: 400
Req: {<0.27354.1>,<<"/api/users/domain.example.com">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"96d133a3d82f1349">>}],
<<"{\"username\":\"m@ke\",\"password\":\"nicniema\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Fri, 04 Mar 2022 11:25:00 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"35">>}],
<<"Invalid JID m@ke@domain.example.com">>,168,642}
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-03-04 11:25:01.347 ***
REST request fails:
Code: 400
Req: {<0.27358.1>,<<"/api/users/domain.example.com/@mike">>,<<"DELETE">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"97fb02e2a5248e4b">>}],
<<>>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Fri, 04 Mar 2022 11:25:00 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"11">>}],
<<"Invalid JID">>,144,745}
Params: #{body => <<>>,method => <<"DELETE">>,
path => <<"/api/users/domain.example.com/@mike">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
=== Ended at 2022-03-04 11:25:01
=== successfully completed test case
=== === Returned value: ok