=== Test case: rest_SUITE:user_can_be_registered_and_removed/1 (click for source code)
=== Config value:
[{watchdog,<0.54391.0>},
{{ejabberd_cwd,mongooseim@localhost},
"/home/circleci/project/_build/mim1/rel/mongooseim"},
{mam_backend,disabled},
{preset,"internal_mnesia"},
{mim_data_dir,"/home/circleci/project/big_tests/tests/rest_SUITE_data"},
{tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@8f270c211212.2024-04-22_14.32.33/big_tests.tests.rest_SUITE.logs/run.2024-04-22_14.46.48/rest_suite.user_can_be_registered_and_removed.72451.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@8f270c211212.2024-04-22_14.32.33/big_tests.tests.rest_SUITE.logs/run.2024-04-22_14.46.48/log_private/"},
{{saved_modules,mongooseim@localhost,<<"localhost">>},
#{mod_vcard =>
#{matches => 30,
host => {prefix,<<"vjud.">>},
search => true,iqdisc => parallel,backend => mnesia},
mod_roster =>
#{iqdisc => one_queue,backend => mnesia,versioning => false,
store_current_id => false},
mod_amp => #{},
mod_register =>
#{access => register,iqdisc => one_queue,
registration_watchers => [],password_strength => 0,
ip_access => [{allow,"127.0.0.0/8"},{deny,"0.0.0.0/0"}]},
mod_sic => #{iqdisc => one_queue},
mod_presence => #{},
mod_disco =>
#{iqdisc => one_queue,server_info => [],extra_domains => [],
users_can_see_hidden_services => false},
mod_stream_management =>
#{buffer => true,ack => true,backend => mnesia,buffer_max => 100,
stale_h =>
#{enabled => false,repeat_after => 1800,geriatric => 3600},
ack_freq => 1,resume_timeout => 600},
mod_adhoc => #{iqdisc => one_queue,report_commands_node => false},
mod_bosh =>
#{backend => mnesia,inactivity => 30,max_pause => 120,
max_wait => infinity,server_acks => false},
mod_cache_users =>
#{strategy => fifo,number_of_segments => 5,time_to_live => 2},
mod_carboncopy => #{iqdisc => no_queue}}},
{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@8f270c211212.2024-04-22_14.32.33"
=== Started at 2024-04-22 14:46:49
*** User 2024-04-22 14:46:49.073 ***🔗
REST request:
Code: 200
Req: {<0.54561.0>,<<"/api/users/localhost">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"a2e2e424d3b5aaf0">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Mon, 22 Apr 2024 14:46:48 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"220">>}],
<<"[\"alice@localhost\",\"alice_invalid_query_string_1820@localhost\",\"alice_messages_are_sent_and_received_1821@localhost\",\"alice_session_can_be_kicked_1822@localhost\",\"bob@localhost\",\"bob_invalid_query_string_1820@localhost\"]">>,
345,829}
Params: #{path => <<"/api/users/localhost">>,
server => #{node => mongooseim@localhost},
role => admin,method => <<"GET">>,body => <<>>,
return_headers => true}
*** User 2024-04-22 14:46:49.076 ***🔗
REST request:
Code: 201
Req: {<0.54571.0>,<<"/api/users/localhost">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"5a92e39cb44e0a41">>}],
<<"{\"username\":\"mike\",\"password\":\"nicniema\"}">>}
Result: {{<<"201">>,<<"Created">>},
[{<<"server">>,<<"Cowboy">>},
{<<"location">>,
<<"http://localhost:8088/api/users/localhost/mike">>},
{<<"date">>,<<"Mon, 22 Apr 2024 14:46:48 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"43">>}],
<<"User mike@localhost successfully registered">>,230,899}
Params: #{path => <<"/api/users/localhost">>,
server => #{node => mongooseim@localhost},
role => admin,method => <<"POST">>,
body => <<"{\"username\":\"mike\",\"password\":\"nicniema\"}">>,
return_headers => true}
*** User 2024-04-22 14:46:49.078 ***🔗
REST request:
Code: 200
Req: {<0.54582.0>,<<"/api/users/localhost">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"ccb5d4f644e169e1">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Mon, 22 Apr 2024 14:46:48 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"539">>}],
<<"[\"alice@localhost\",\"alice_invalid_query_string_1820@localhost\",\"alice_message_errors_1823@localhost\",\"alice_messages_are_sent_and_received_1821@localhost\",\"alice_session_can_be_kicked_1822@localhost\",\"alice_stanza_errors_1825@localhost\",\"alice_stanzas_are_sent_and_received_1824@localhost\",\"bob@localhost\",\"bob_invalid_query_string_1820@localhost\",\"bob_message_errors_1823@localhost\",\"bob_messages_are_sent_and_received_1821@localhost\",\"bob_stanza_errors_1825@localhost\",\"bob_stanzas_are_sent_and_received_1824@localhost\",\"mike@localhost\"]">>,
664,417}
Params: #{path => <<"/api/users/localhost">>,
server => #{node => mongooseim@localhost},
role => admin,method => <<"GET">>,body => <<>>,
return_headers => true}
*** User 2024-04-22 14:46:49.081 ***🔗
REST request fails:
Code: 403
Req: {<0.54586.0>,<<"/api/users/localhost">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"96c9c0ad94485ea5">>}],
<<"{\"username\":\"mike\",\"password\":\"nicniema\"}">>}
Result: {{<<"403">>,<<"Forbidden">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Mon, 22 Apr 2024 14:46:48 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"69">>}],
<<"\"User mike@localhost already registered at node mongooseim@localhost\"">>,
200,794}
Params: #{path => <<"/api/users/localhost">>,
server => #{node => mongooseim@localhost},
role => admin,method => <<"POST">>,
body => <<"{\"username\":\"mike\",\"password\":\"nicniema\"}">>,
return_headers => true}
*** User 2024-04-22 14:46:49.084 ***🔗
REST request:
Code: 204
Req: {<0.54605.0>,<<"/api/users/localhost/mike">>,<<"DELETE">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"a020a688b0a05c90">>}],
<<>>}
Result: {{<<"204">>,<<"No Content">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Mon, 22 Apr 2024 14:46:48 GMT">>}],
<<>>,80,932}
Params: #{path => <<"/api/users/localhost/mike">>,
server => #{node => mongooseim@localhost},
role => admin,method => <<"DELETE">>,body => <<>>,
return_headers => true}
*** User 2024-04-22 14:46:49.086 ***🔗
REST request:
Code: 200
Req: {<0.54627.0>,<<"/api/users/localhost">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"e5b7116fd4412580">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Mon, 22 Apr 2024 14:46:48 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"522">>}],
<<"[\"alice@localhost\",\"alice_invalid_query_string_1820@localhost\",\"alice_message_errors_1823@localhost\",\"alice_messages_are_sent_and_received_1821@localhost\",\"alice_session_can_be_kicked_1822@localhost\",\"alice_stanza_errors_1825@localhost\",\"alice_stanzas_are_sent_and_received_1824@localhost\",\"bob@localhost\",\"bob_invalid_query_string_1820@localhost\",\"bob_message_errors_1823@localhost\",\"bob_messages_are_sent_and_received_1821@localhost\",\"bob_stanza_errors_1825@localhost\",\"bob_stanzas_are_sent_and_received_1824@localhost\"]">>,
647,618}
Params: #{path => <<"/api/users/localhost">>,
server => #{node => mongooseim@localhost},
role => admin,method => <<"GET">>,body => <<>>,
return_headers => true}
=== Ended at 2024-04-22 14:46:49
=== successfully completed test case
=== === Returned value: ok