=== Test case: rest_SUITE:user_can_be_registered_and_removed/1 (click for source code)
=== Config value:
[{watchdog,<0.24874.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@998557c7e1d1.2022-01-27_12.27.57/big_tests.tests.rest_SUITE.logs/run.2022-01-27_12.36.31/rest_suite.user_can_be_registered_and_removed.120706.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@998557c7e1d1.2022-01-27_12.27.57/big_tests.tests.rest_SUITE.logs/run.2022-01-27_12.36.31/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@998557c7e1d1.2022-01-27_12.27.57"
=== Started at 2022-01-27 12:36:31
*** User 2022-01-27 12:36:31.290 ***
REST request:
Code: 200
Req: {<0.25027.1>,<<"/api/users/domain.example.com">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"644108d983865717">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 27 Jan 2022 12:36:31 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"53">>}],
<<"[\"alice@domain.example.com\",\"bob@domain.example.com\"]">>,177,
2571}
Params: #{body => <<>>,method => <<"GET">>,
path => <<"/api/users/domain.example.com">>,return_headers => true,
role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-01-27 12:36:31.309 ***
REST request:
Code: 201
Req: {<0.25029.1>,<<"/api/users/domain.example.com">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"73cbb35ba9164412">>}],
<<"{\"username\":\"mike\",\"password\":\"nicniema\"}">>}
Result: {{<<"201">>,<<"Created">>},
[{<<"server">>,<<"Cowboy">>},
{<<"location">>,
<<"http://localhost:8088/api/users/domain.example.com/User mike@domain.example.comsuccessfully registered">>},
{<<"date">>,<<"Thu, 27 Jan 2022 12:36:31 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"51">>}],
<<"User mike@domain.example.comsuccessfully registered">>,294,17395}
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-01-27 12:36:31.336 ***
REST request:
Code: 200
Req: {<0.25062.1>,<<"/api/users/domain.example.com">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"28c2b9071f1cd43a">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 27 Jan 2022 12:36:31 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"709">>}],
<<"[\"alice@domain.example.com\",\"alice_messages_are_archived_1731@domain.example.com\",\"alice_messages_are_sent_and_received_1729@domain.example.com\",\"alice_messages_can_be_paginated_1733@domain.example.com\",\"alice_messages_error_handling_1732@domain.example.com\",\"alice_session_can_be_kicked_1728@domain.example.com\",\"alice_stanzas_are_sent_and_received_1730@domain.example.com\",\"bob@domain.example.com\",\"bob_messages_are_archived_1731@domain.example.com\",\"bob_messages_are_sent_and_received_1729@domain.example.com\",\"bob_messages_can_be_paginated_1733@domain.example.com\",\"bob_messages_error_handling_1732@domain.example.com\",\"bob_stanzas_are_sent_and_received_1730@domain.example.com\",\"mike@domain.example.com\"]">>,
834,2015}
Params: #{body => <<>>,method => <<"GET">>,
path => <<"/api/users/domain.example.com">>,return_headers => true,
role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-01-27 12:36:31.341 ***
REST request fails:
Code: 403
Req: {<0.25067.1>,<<"/api/users/domain.example.com">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"1c4416351295fb1e">>}],
<<"{\"username\":\"mike\",\"password\":\"nicniema\"}">>}
Result: {{<<"403">>,<<"Forbidden">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 27 Jan 2022 12:36:31 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"76">>}],
<<"User mike@domain.example.com already registered at node mongooseim@localhost">>,
207,2581}
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-01-27 12:36:31.445 ***
REST request:
Code: 204
Req: {<0.25077.1>,<<"/api/users/domain.example.com/mike">>,<<"DELETE">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"b177990e5c25fd6d">>}],
<<>>}
Result: {{<<"204">>,<<"No Content">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 27 Jan 2022 12:36:31 GMT">>},
{<<"content-type">>,<<"application/json">>}],
<<>>,112,97366}
Params: #{body => <<>>,method => <<"DELETE">>,
path => <<"/api/users/domain.example.com/mike">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-01-27 12:36:31.450 ***
REST request:
Code: 200
Req: {<0.25129.1>,<<"/api/users/domain.example.com">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"e4e2c79c758ec965">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 27 Jan 2022 12:36:31 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"683">>}],
<<"[\"alice@domain.example.com\",\"alice_messages_are_archived_1731@domain.example.com\",\"alice_messages_are_sent_and_received_1729@domain.example.com\",\"alice_messages_can_be_paginated_1733@domain.example.com\",\"alice_messages_error_handling_1732@domain.example.com\",\"alice_session_can_be_kicked_1728@domain.example.com\",\"alice_stanzas_are_sent_and_received_1730@domain.example.com\",\"bob@domain.example.com\",\"bob_messages_are_archived_1731@domain.example.com\",\"bob_messages_are_sent_and_received_1729@domain.example.com\",\"bob_messages_can_be_paginated_1733@domain.example.com\",\"bob_messages_error_handling_1732@domain.example.com\",\"bob_stanzas_are_sent_and_received_1730@domain.example.com\"]">>,
808,4412}
Params: #{body => <<>>,method => <<"GET">>,
path => <<"/api/users/domain.example.com">>,return_headers => true,
role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-01-27 12:36:31.453 ***
REST request fails:
Code: 400
Req: {<0.25137.1>,<<"/api/users/domain.example.com">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"ff30beaf97e2070e">>}],
<<"{\"username\":\"m@ke\",\"password\":\"nicniema\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 27 Jan 2022 12:36:31 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"36">>}],
<<"Invalid jid: m@ke@domain.example.com">>,169,1335}
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-01-27 12:36:31.456 ***
REST request fails:
Code: 400
Req: {<0.25139.1>,<<"/api/users/domain.example.com/@mike">>,<<"DELETE">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"31766bcfc4d21020">>}],
<<>>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 27 Jan 2022 12:36:31 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"49">>}],
<<"Invalid jid: <<\"@mike\">>@<<\"domain.example.com\">>">>,182,961}
Params: #{body => <<>>,method => <<"DELETE">>,
path => <<"/api/users/domain.example.com/@mike">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
=== Ended at 2022-01-27 12:36:31
=== successfully completed test case
=== === Returned value: ok