=== Test case: rest_SUITE:password_can_be_changed/1 (click for source code)
=== Config value:
[{watchdog,<0.13681.1>},
{{ejabberd_cwd,mongooseim@localhost},
"/home/circleci/project/_build/mim1/rel/mongooseim"},
{mam_backend,disabled},
{mim_data_dir,"/home/circleci/project/big_tests/tests/rest_SUITE_data"},
{preset,"internal_mnesia"},
{tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@34a9b6d2516c.2022-01-27_15.25.07/big_tests.tests.rest_SUITE.logs/run.2022-01-27_15.35.34/rest_suite.password_can_be_changed.11269.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@34a9b6d2516c.2022-01-27_15.25.07/big_tests.tests.rest_SUITE.logs/run.2022-01-27_15.35.34/log_private/"},
{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@34a9b6d2516c.2022-01-27_15.25.07"
=== Started at 2022-01-27 15:35:34
*** User 2022-01-27 15:35:34.908 ***
bOb@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2022-01-27 15:35:34.908 ***
bOb@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='b37f38cb4aaf014d' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-01-27 15:35:34.908 ***
bOb@localhost/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 15:35:34.909 ***
bOb@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYgBtYWtyb2xpa2E=</auth>
*** User 2022-01-27 15:35:34.909 ***
bOb@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2022-01-27 15:35:34.909 ***
bOb@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2022-01-27 15:35:34.910 ***
bOb@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='79c5863f1fc8c7de' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-01-27 15:35:34.910 ***
bOb@localhost/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 15:35:34.910 ***
bOb@localhost/res1 out
<iq type='set' id='5e5a87464997b5058c87bf8c650f6c97'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2022-01-27 15:35:34.911 ***
bOb@localhost/res1 in
<iq id='5e5a87464997b5058c87bf8c650f6c97' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>bOb@localhost/res1</jid>
</bind>
</iq>
*** User 2022-01-27 15:35:34.911 ***
bOb@localhost/res1 out
<iq type='set' id='3f02c0f1787832787b00900e82da9e31'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-27 15:35:34.911 ***
bOb@localhost/res1 in
<iq type='result' id='3f02c0f1787832787b00900e82da9e31'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-27 15:35:34.911 ***
bOb@localhost/res1 out
<presence/>
*** User 2022-01-27 15:35:34.912 ***
bOb@localhost/res1 in
<presence from='bOb@localhost/res1' to='bob@localhost/res1' xml:lang='en'/>
*** User 2022-01-27 15:35:34.912 ***
bOb@localhost/res1 out
</stream:stream>
*** User 2022-01-27 15:35:34.913 ***
bOb@localhost/res1 in
</stream:stream>
*** User 2022-01-27 15:35:34.915 ***
REST request:
Code: 204
Req: {<0.13867.1>,<<"/api/users/localhost/bob">>,<<"PUT">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"e1ee2bd76770172a">>}],
<<"{\"newpass\":\"niemakrolika\"}">>}
Result: {{<<"204">>,<<"No Content">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 27 Jan 2022 15:35:34 GMT">>},
{<<"content-type">>,<<"application/json">>}],
<<>>,112,1199}
Params: #{body => <<"{\"newpass\":\"niemakrolika\"}">>,method => <<"PUT">>,
path => <<"/api/users/localhost/bob">>,return_headers => true,
role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-01-27 15:35:34.916 ***
bOb@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2022-01-27 15:35:34.917 ***
bOb@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='f6922557356cebc8' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-01-27 15:35:34.917 ***
bOb@localhost/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 15:35:34.917 ***
bOb@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYgBuaWVtYWtyb2xpa2E=</auth>
*** User 2022-01-27 15:35:34.917 ***
bOb@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2022-01-27 15:35:34.917 ***
bOb@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2022-01-27 15:35:34.918 ***
bOb@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='9157d6b4ee6b2328' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-01-27 15:35:34.918 ***
bOb@localhost/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 15:35:34.918 ***
bOb@localhost/res1 out
<iq type='set' id='1d259385df8c0af649081cc7bea02d8c'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2022-01-27 15:35:34.918 ***
bOb@localhost/res1 in
<iq id='1d259385df8c0af649081cc7bea02d8c' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>bOb@localhost/res1</jid>
</bind>
</iq>
*** User 2022-01-27 15:35:34.918 ***
bOb@localhost/res1 out
<iq type='set' id='809eb70f51654f4f4d0e86c1d38f5a5b'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-27 15:35:34.918 ***
bOb@localhost/res1 in
<iq type='result' id='809eb70f51654f4f4d0e86c1d38f5a5b'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-27 15:35:34.919 ***
bOb@localhost/res1 out
<presence/>
*** User 2022-01-27 15:35:34.919 ***
bOb@localhost/res1 in
<presence from='bOb@localhost/res1' to='bob@localhost/res1' xml:lang='en'/>
*** User 2022-01-27 15:35:34.919 ***
bOb@localhost/res1 out
</stream:stream>
*** User 2022-01-27 15:35:34.920 ***
bOb@localhost/res1 in
</stream:stream>
*** User 2022-01-27 15:35:34.920 ***
bOb@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2022-01-27 15:35:34.920 ***
bOb@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='9e5834c0424e95d1' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-01-27 15:35:34.921 ***
bOb@localhost/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 15:35:34.921 ***
bOb@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYgBtYWtyb2xpa2E=</auth>
*** User 2022-01-27 15:35:34.921 ***
bOb@localhost/res1 in
<failure xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
<not-authorized/>
</failure>
*** User 2022-01-27 15:35:34.925 ***
REST request:
Code: 204
Req: {<0.13921.1>,<<"/api/users/localhost/bob">>,<<"PUT">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"f24ca747128c3a16">>}],
<<"{\"newpass\":\"makrolika\"}">>}
Result: {{<<"204">>,<<"No Content">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 27 Jan 2022 15:35:34 GMT">>},
{<<"content-type">>,<<"application/json">>}],
<<>>,112,514}
Params: #{body => <<"{\"newpass\":\"makrolika\"}">>,method => <<"PUT">>,
path => <<"/api/users/localhost/bob">>,return_headers => true,
role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-01-27 15:35:34.925 ***
bOb@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2022-01-27 15:35:34.926 ***
bOb@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='cd2e55be0f25de8c' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-01-27 15:35:34.926 ***
bOb@localhost/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 15:35:34.926 ***
bOb@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYgBtYWtyb2xpa2E=</auth>
*** User 2022-01-27 15:35:34.926 ***
bOb@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2022-01-27 15:35:34.926 ***
bOb@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2022-01-27 15:35:34.927 ***
bOb@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='4a8800e2fd9eb181' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-01-27 15:35:34.927 ***
bOb@localhost/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 15:35:34.927 ***
bOb@localhost/res1 out
<iq type='set' id='6def579558d47e76ae12a0e247912315'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2022-01-27 15:35:34.927 ***
bOb@localhost/res1 in
<iq id='6def579558d47e76ae12a0e247912315' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>bOb@localhost/res1</jid>
</bind>
</iq>
*** User 2022-01-27 15:35:34.927 ***
bOb@localhost/res1 out
<iq type='set' id='a83b49613bb3033a4055b650321e3d4a'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-27 15:35:34.927 ***
bOb@localhost/res1 in
<iq type='result' id='a83b49613bb3033a4055b650321e3d4a'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-27 15:35:34.928 ***
bOb@localhost/res1 out
<presence/>
*** User 2022-01-27 15:35:34.928 ***
bOb@localhost/res1 in
<presence from='bOb@localhost/res1' to='bob@localhost/res1' xml:lang='en'/>
*** User 2022-01-27 15:35:34.928 ***
bOb@localhost/res1 out
</stream:stream>
*** User 2022-01-27 15:35:34.929 ***
bOb@localhost/res1 in
</stream:stream>
*** User 2022-01-27 15:35:34.930 ***
REST request fails:
Code: 400
Req: {<0.13940.1>,<<"/api/users/localhost/bob">>,<<"PUT">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"f2d3955ff2757640">>}],
<<"{\"newpass\":\"\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 27 Jan 2022 15:35:34 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"14">>}],
<<"Empty password">>,147,552}
Params: #{body => <<"{\"newpass\":\"\"}">>,method => <<"PUT">>,
path => <<"/api/users/localhost/bob">>,return_headers => true,
role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-01-27 15:35:34.933 ***
REST request fails:
Code: 400
Req: {<0.13945.1>,<<"/api/users/localhost/b@b">>,<<"PUT">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"9ab95ef504bc8b07">>}],
<<"{\"newpass\":\"niemakrolika\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 27 Jan 2022 15:35:34 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"11">>}],
<<"Invalid JID">>,144,1940}
Params: #{body => <<"{\"newpass\":\"niemakrolika\"}">>,method => <<"PUT">>,
path => <<"/api/users/localhost/b@b">>,return_headers => true,
role => admin,
server => #{node => mongooseim@localhost}}
=== Ended at 2022-01-27 15:35:34
=== successfully completed test case
=== === Returned value: ok