=== Test case: rest_SUITE:password_can_be_changed/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.password_can_be_changed.61700.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.293 ***
bOb@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2022-01-27 12:36:31.295 ***
bOb@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='0da94e5419d87aab' from='domain.example.com' version='1.0' xml:lang='en'>
*** User 2022-01-27 12:36:31.296 ***
bOb@domain.example.com/res1 in
<stream:features>
<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
<compression xmlns='http://jabber.org/features/compress'>
<method>zlib</method>
</compression>
<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
<mechanism>SCRAM-SHA-256</mechanism>
<mechanism>PLAIN</mechanism>
</mechanisms>
<register xmlns='http://jabber.org/features/iq-register'/>
<amp xmlns='http://jabber.org/feature/amp'/>
<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>
*** User 2022-01-27 12:36:31.296 ***
bOb@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYgBtYWtyb2xpa2E=</auth>
*** User 2022-01-27 12:36:31.334 ***
bOb@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2022-01-27 12:36:31.334 ***
bOb@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2022-01-27 12:36:31.335 ***
bOb@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='57fbd6078869cd79' from='domain.example.com' version='1.0' xml:lang='en'>
*** User 2022-01-27 12:36:31.335 ***
bOb@domain.example.com/res1 in
<stream:features>
<compression xmlns='http://jabber.org/features/compress'>
<method>zlib</method>
</compression>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
<register xmlns='http://jabber.org/features/iq-register'/>
<amp xmlns='http://jabber.org/feature/amp'/>
<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>
*** User 2022-01-27 12:36:31.335 ***
bOb@domain.example.com/res1 out
<iq type='set' id='f7a67331019f646ac3f8ef1ec5c85e54'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2022-01-27 12:36:31.335 ***
bOb@domain.example.com/res1 in
<iq id='f7a67331019f646ac3f8ef1ec5c85e54' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>bOb@domain.example.com/res1</jid>
</bind>
</iq>
*** User 2022-01-27 12:36:31.336 ***
bOb@domain.example.com/res1 out
<iq type='set' id='9cec1b9784452b30300b46ac7cac92c5'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-27 12:36:31.336 ***
bOb@domain.example.com/res1 in
<iq type='result' id='9cec1b9784452b30300b46ac7cac92c5'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-27 12:36:31.338 ***
bOb@domain.example.com/res1 out
<presence/>
*** User 2022-01-27 12:36:31.344 ***
bOb@domain.example.com/res1 in
<presence from='bOb@domain.example.com/res1' to='bob@domain.example.com/res1' xml:lang='en'/>
*** User 2022-01-27 12:36:31.344 ***
bOb@domain.example.com/res1 out
</stream:stream>
*** User 2022-01-27 12:36:31.345 ***
bOb@domain.example.com/res1 in
</stream:stream>
*** User 2022-01-27 12:36:31.354 ***
REST request:
Code: 204
Req: {<0.25081.1>,<<"/api/users/domain.example.com/bob">>,<<"PUT">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"80878e3e3e2f8b27">>}],
<<"{\"newpass\":\"niemakrolika\"}">>}
Result: {{<<"204">>,<<"No Content">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 27 Jan 2022 12:36:31 GMT">>},
{<<"content-type">>,<<"application/json">>}],
<<>>,112,6794}
Params: #{body => <<"{\"newpass\":\"niemakrolika\"}">>,method => <<"PUT">>,
path => <<"/api/users/domain.example.com/bob">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-01-27 12:36:31.355 ***
bOb@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2022-01-27 12:36:31.356 ***
bOb@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='f5af4afb9c7c6206' from='domain.example.com' version='1.0' xml:lang='en'>
*** User 2022-01-27 12:36:31.356 ***
bOb@domain.example.com/res1 in
<stream:features>
<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
<compression xmlns='http://jabber.org/features/compress'>
<method>zlib</method>
</compression>
<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
<mechanism>SCRAM-SHA-256</mechanism>
<mechanism>PLAIN</mechanism>
</mechanisms>
<register xmlns='http://jabber.org/features/iq-register'/>
<amp xmlns='http://jabber.org/feature/amp'/>
<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>
*** User 2022-01-27 12:36:31.356 ***
bOb@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYgBuaWVtYWtyb2xpa2E=</auth>
*** User 2022-01-27 12:36:31.359 ***
bOb@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2022-01-27 12:36:31.359 ***
bOb@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2022-01-27 12:36:31.360 ***
bOb@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='59802e58d35b143b' from='domain.example.com' version='1.0' xml:lang='en'>
*** User 2022-01-27 12:36:31.360 ***
bOb@domain.example.com/res1 in
<stream:features>
<compression xmlns='http://jabber.org/features/compress'>
<method>zlib</method>
</compression>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
<register xmlns='http://jabber.org/features/iq-register'/>
<amp xmlns='http://jabber.org/feature/amp'/>
<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>
*** User 2022-01-27 12:36:31.360 ***
bOb@domain.example.com/res1 out
<iq type='set' id='0fa38c3869041d5ff59d1a83c6f1ca41'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2022-01-27 12:36:31.361 ***
bOb@domain.example.com/res1 in
<iq id='0fa38c3869041d5ff59d1a83c6f1ca41' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>bOb@domain.example.com/res1</jid>
</bind>
</iq>
*** User 2022-01-27 12:36:31.361 ***
bOb@domain.example.com/res1 out
<iq type='set' id='b0bc74bfe347d62ac64d48df01db4f12'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-27 12:36:31.365 ***
bOb@domain.example.com/res1 in
<iq type='result' id='b0bc74bfe347d62ac64d48df01db4f12'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-27 12:36:31.365 ***
bOb@domain.example.com/res1 out
<presence/>
*** User 2022-01-27 12:36:31.372 ***
bOb@domain.example.com/res1 in
<presence from='bOb@domain.example.com/res1' to='bob@domain.example.com/res1' xml:lang='en'/>
*** User 2022-01-27 12:36:31.373 ***
bOb@domain.example.com/res1 out
</stream:stream>
*** User 2022-01-27 12:36:31.373 ***
bOb@domain.example.com/res1 in
</stream:stream>
*** User 2022-01-27 12:36:31.375 ***
bOb@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2022-01-27 12:36:31.376 ***
bOb@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='d4ec921d6419bf38' from='domain.example.com' version='1.0' xml:lang='en'>
*** User 2022-01-27 12:36:31.376 ***
bOb@domain.example.com/res1 in
<stream:features>
<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
<compression xmlns='http://jabber.org/features/compress'>
<method>zlib</method>
</compression>
<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
<mechanism>SCRAM-SHA-256</mechanism>
<mechanism>PLAIN</mechanism>
</mechanisms>
<register xmlns='http://jabber.org/features/iq-register'/>
<amp xmlns='http://jabber.org/feature/amp'/>
<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>
*** User 2022-01-27 12:36:31.376 ***
bOb@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYgBtYWtyb2xpa2E=</auth>
*** User 2022-01-27 12:36:31.378 ***
bOb@domain.example.com/res1 in
<failure xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
<not-authorized/>
</failure>
*** User 2022-01-27 12:36:31.435 ***
REST request:
Code: 204
Req: {<0.25120.1>,<<"/api/users/domain.example.com/bob">>,<<"PUT">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"bef32e650862f1fb">>}],
<<"{\"newpass\":\"makrolika\"}">>}
Result: {{<<"204">>,<<"No Content">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 27 Jan 2022 12:36:31 GMT">>},
{<<"content-type">>,<<"application/json">>}],
<<>>,112,53643}
Params: #{body => <<"{\"newpass\":\"makrolika\"}">>,method => <<"PUT">>,
path => <<"/api/users/domain.example.com/bob">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-01-27 12:36:31.436 ***
bOb@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2022-01-27 12:36:31.436 ***
bOb@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='62750d025e1304d8' from='domain.example.com' version='1.0' xml:lang='en'>
*** User 2022-01-27 12:36:31.437 ***
bOb@domain.example.com/res1 in
<stream:features>
<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
<compression xmlns='http://jabber.org/features/compress'>
<method>zlib</method>
</compression>
<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
<mechanism>SCRAM-SHA-256</mechanism>
<mechanism>PLAIN</mechanism>
</mechanisms>
<register xmlns='http://jabber.org/features/iq-register'/>
<amp xmlns='http://jabber.org/feature/amp'/>
<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>
*** User 2022-01-27 12:36:31.437 ***
bOb@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYgBtYWtyb2xpa2E=</auth>
*** User 2022-01-27 12:36:31.438 ***
bOb@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2022-01-27 12:36:31.438 ***
bOb@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2022-01-27 12:36:31.439 ***
bOb@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='107e9082038d2266' from='domain.example.com' version='1.0' xml:lang='en'>
*** User 2022-01-27 12:36:31.439 ***
bOb@domain.example.com/res1 in
<stream:features>
<compression xmlns='http://jabber.org/features/compress'>
<method>zlib</method>
</compression>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
<register xmlns='http://jabber.org/features/iq-register'/>
<amp xmlns='http://jabber.org/feature/amp'/>
<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>
*** User 2022-01-27 12:36:31.439 ***
bOb@domain.example.com/res1 out
<iq type='set' id='eb887b73771c0debd945dc0ec467934e'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2022-01-27 12:36:31.439 ***
bOb@domain.example.com/res1 in
<iq id='eb887b73771c0debd945dc0ec467934e' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>bOb@domain.example.com/res1</jid>
</bind>
</iq>
*** User 2022-01-27 12:36:31.439 ***
bOb@domain.example.com/res1 out
<iq type='set' id='7c32c94b66c811e3605851a238425985'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-27 12:36:31.439 ***
bOb@domain.example.com/res1 in
<iq type='result' id='7c32c94b66c811e3605851a238425985'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-27 12:36:31.440 ***
bOb@domain.example.com/res1 out
<presence/>
*** User 2022-01-27 12:36:31.442 ***
bOb@domain.example.com/res1 in
<presence from='bOb@domain.example.com/res1' to='bob@domain.example.com/res1' xml:lang='en'/>
*** User 2022-01-27 12:36:31.442 ***
bOb@domain.example.com/res1 out
</stream:stream>
*** User 2022-01-27 12:36:31.442 ***
bOb@domain.example.com/res1 in
</stream:stream>
*** User 2022-01-27 12:36:31.445 ***
REST request fails:
Code: 400
Req: {<0.25125.1>,<<"/api/users/domain.example.com/bob">>,<<"PUT">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"70a898fd010b4145">>}],
<<"{\"newpass\":\"\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 27 Jan 2022 12:36:31 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"14">>}],
<<"empty password">>,147,1122}
Params: #{body => <<"{\"newpass\":\"\"}">>,method => <<"PUT">>,
path => <<"/api/users/domain.example.com/bob">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-01-27 12:36:31.447 ***
REST request fails:
Code: 400
Req: {<0.25127.1>,<<"/api/users/domain.example.com/b@b">>,<<"PUT">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"9fe708b79cb01feb">>}],
<<"{\"newpass\":\"niemakrolika\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 27 Jan 2022 12:36:31 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"11">>}],
<<"invalid jid">>,144,1064}
Params: #{body => <<"{\"newpass\":\"niemakrolika\"}">>,method => <<"PUT">>,
path => <<"/api/users/domain.example.com/b@b">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
=== Ended at 2022-01-27 12:36:31
=== successfully completed test case
=== === Returned value: ok