=== Test case: rest_SUITE:invalid_roster_operations/1 (click for source code)

=== Config value:

    [{watchdog,<0.25384.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.invalid_roster_operations.108803.html"},
     {tc_group_properties,[{name,roster},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:32


*** CT 2022-01-27 12:36:32.383 *** View log from node mongooseim@localhost when started mongooseim@localhost_2461.html
*** CT 2022-01-27 12:36:32.383 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_655.html

*** User 2022-01-27 12:36:32.450 ***
alicE_invalid_roster_operations_1735@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:32.450 ***
alicE_invalid_roster_operations_1735@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='348364180a8a72cd' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-01-27 12:36:32.451 ***
alicE_invalid_roster_operations_1735@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:32.451 ***
alicE_invalid_roster_operations_1735@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX2ludmFsaWRfcm9zdGVyX29wZXJhdGlvbnNfMTczNQBtYXR5Z3J5c2E=</auth>



*** User 2022-01-27 12:36:32.452 ***
alicE_invalid_roster_operations_1735@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-01-27 12:36:32.452 ***
alicE_invalid_roster_operations_1735@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:32.453 ***
alicE_invalid_roster_operations_1735@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='1eee3c7f4bdac441' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-01-27 12:36:32.453 ***
alicE_invalid_roster_operations_1735@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:32.453 ***
alicE_invalid_roster_operations_1735@domain.example.com/res1 out
<iq type='set' id='6055bdab64a3afc304573b355eb31a0c'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-01-27 12:36:32.453 ***
alicE_invalid_roster_operations_1735@domain.example.com/res1 in
<iq id='6055bdab64a3afc304573b355eb31a0c' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alicE_invalid_roster_operations_1735@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2022-01-27 12:36:32.453 ***
alicE_invalid_roster_operations_1735@domain.example.com/res1 out
<iq type='set' id='1eb0feadd19473ec77797e2c9a7542a8'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 12:36:32.454 ***
alicE_invalid_roster_operations_1735@domain.example.com/res1 in
<iq type='result' id='1eb0feadd19473ec77797e2c9a7542a8'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 12:36:32.454 ***
alicE_invalid_roster_operations_1735@domain.example.com/res1 out
<presence/>



*** User 2022-01-27 12:36:32.456 ***
alicE_invalid_roster_operations_1735@domain.example.com/res1 in
<presence from='alicE_invalid_roster_operations_1735@domain.example.com/res1' to='alice_invalid_roster_operations_1735@domain.example.com/res1' xml:lang='en'/>



*** User 2022-01-27 12:36:32.457 ***
bOb_invalid_roster_operations_1735@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:32.457 ***
bOb_invalid_roster_operations_1735@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='d2a70ea94109fc4f' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-01-27 12:36:32.458 ***
bOb_invalid_roster_operations_1735@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:32.458 ***
bOb_invalid_roster_operations_1735@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9pbnZhbGlkX3Jvc3Rlcl9vcGVyYXRpb25zXzE3MzUAbWFrcm9saWth</auth>



*** User 2022-01-27 12:36:32.459 ***
bOb_invalid_roster_operations_1735@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-01-27 12:36:32.459 ***
bOb_invalid_roster_operations_1735@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:32.459 ***
bOb_invalid_roster_operations_1735@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='02ca8b8b05ee8540' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-01-27 12:36:32.460 ***
bOb_invalid_roster_operations_1735@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:32.460 ***
bOb_invalid_roster_operations_1735@domain.example.com/res1 out
<iq type='set' id='3100fc264053b35903bee547ccc43063'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-01-27 12:36:32.460 ***
bOb_invalid_roster_operations_1735@domain.example.com/res1 in
<iq id='3100fc264053b35903bee547ccc43063' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bOb_invalid_roster_operations_1735@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2022-01-27 12:36:32.460 ***
bOb_invalid_roster_operations_1735@domain.example.com/res1 out
<iq type='set' id='78930624e156d89d2a5cdfe4dd046094'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 12:36:32.461 ***
bOb_invalid_roster_operations_1735@domain.example.com/res1 in
<iq type='result' id='78930624e156d89d2a5cdfe4dd046094'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 12:36:32.461 ***
bOb_invalid_roster_operations_1735@domain.example.com/res1 out
<presence/>



*** User 2022-01-27 12:36:32.464 ***
bOb_invalid_roster_operations_1735@domain.example.com/res1 in
<presence from='bOb_invalid_roster_operations_1735@domain.example.com/res1' to='bob_invalid_roster_operations_1735@domain.example.com/res1' xml:lang='en'/>



*** User 2022-01-27 12:36:32.466 ***
REST request fails:
Code: 400
Req: {<0.25447.1>,
      <<"/api/contacts/alice_invalid_roster_operations_1735@domain.example.com">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"d54b29ba8441b040">>}],
      <<"{\"jid\":\"@invalidjid\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 12:36:32 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"30">>}],
         <<"Invalid jid: <<\"@invalidjid\">>">>,163,1103}
Params: #{body => <<"{\"jid\":\"@invalidjid\"}">>,method => <<"POST">>,
          path =>
              <<"/api/contacts/alice_invalid_roster_operations_1735@domain.example.com">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 12:36:32.469 ***
REST request fails:
Code: 400
Req: {<0.25451.1>,<<"/api/contacts/@invalid_jid">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"e95fd0ed117d83ee">>}],
      <<"{\"jid\":\"bob_invalid_roster_operations_1735@domain.example.com\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 12:36:32 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"31">>}],
         <<"Invalid jid: <<\"@invalid_jid\">>">>,164,1223}
Params: #{body =>
              <<"{\"jid\":\"bob_invalid_roster_operations_1735@domain.example.com\"}">>,
          method => <<"POST">>,path => <<"/api/contacts/@invalid_jid">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 12:36:32.509 ***
REST request:
Code: 204
Req: {<0.25453.1>,
      <<"/api/contacts/alice_invalid_roster_operations_1735@domain.example.com">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"3dcf4ed7c83b07ce">>}],
      <<"{\"jid\":\"bob_invalid_roster_operations_1735@domain.example.com\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 12:36:32 GMT">>},
          {<<"content-type">>,<<"application/json">>}],
         <<>>,112,38087}
Params: #{body =>
              <<"{\"jid\":\"bob_invalid_roster_operations_1735@domain.example.com\"}">>,
          method => <<"POST">>,
          path =>
              <<"/api/contacts/alice_invalid_roster_operations_1735@domain.example.com">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 12:36:32.523 ***
REST request:
Code: 204
Req: {<0.25464.1>,
      <<"/api/contacts/alice_invalid_roster_operations_1735@domain.example.com">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"34213c10477c330a">>}],
      <<"{\"jid\":\"bob_invalid_roster_operations_1735@domain.example.com\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 12:36:32 GMT">>},
          {<<"content-type">>,<<"application/json">>}],
         <<>>,112,12075}
Params: #{body =>
              <<"{\"jid\":\"bob_invalid_roster_operations_1735@domain.example.com\"}">>,
          method => <<"POST">>,
          path =>
              <<"/api/contacts/alice_invalid_roster_operations_1735@domain.example.com">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 12:36:32.526 ***
REST request fails:
Code: 400
Req: {<0.25475.1>,
      <<"/api/contacts/alice_invalid_roster_operations_1735@domain.example.com/@invalid_jid">>,
      <<"PUT">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"474c24e3628201ed">>}],
      <<"{\"action\":\"subscribe\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 12:36:32 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"31">>}],
         <<"Invalid jid: <<\"@invalid_jid\">>">>,164,1004}
Params: #{body => <<"{\"action\":\"subscribe\"}">>,method => <<"PUT">>,
          path =>
              <<"/api/contacts/alice_invalid_roster_operations_1735@domain.example.com/@invalid_jid">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 12:36:32.529 ***
REST request fails:
Code: 400
Req: {<0.25477.1>,
      <<"/api/contacts/@invalid_jid/bob_invalid_roster_operations_1735@domain.example.com">>,
      <<"PUT">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"61e551e601fddd38">>}],
      <<"{\"action\":\"subscribe\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 12:36:32 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"31">>}],
         <<"Invalid jid: <<\"@invalid_jid\">>">>,164,1035}
Params: #{body => <<"{\"action\":\"subscribe\"}">>,method => <<"PUT">>,
          path =>
              <<"/api/contacts/@invalid_jid/bob_invalid_roster_operations_1735@domain.example.com">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 12:36:32.533 ***
REST request fails:
Code: 400
Req: {<0.25479.1>,
      <<"/api/contacts/alice_invalid_roster_operations_1735@domain.example.com/bob_invalid_roster_operations_1735@domain.example.com">>,
      <<"PUT">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"6a91ada6cc87ba71">>}],
      <<"{\"action\":\"something stupid\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 12:36:32 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"14">>}],
         <<"invalid action">>,147,1151}
Params: #{body => <<"{\"action\":\"something stupid\"}">>,method => <<"PUT">>,
          path =>
              <<"/api/contacts/alice_invalid_roster_operations_1735@domain.example.com/bob_invalid_roster_operations_1735@domain.example.com">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 12:36:32.536 ***
REST request fails:
Code: 400
Req: {<0.25483.1>,
      <<"/api/contacts/alice_invalid_roster_operations_1735@domain.example.com/bob_invalid_roster_operations_1735@domain.example.com/manage">>,
      <<"PUT">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"4f4244d906298563">>}],
      <<"{\"action\":\"off with his head\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 12:36:32 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"14">>}],
         <<"invalid action">>,147,1040}
Params: #{body => <<"{\"action\":\"off with his head\"}">>,
          method => <<"PUT">>,
          path =>
              <<"/api/contacts/alice_invalid_roster_operations_1735@domain.example.com/bob_invalid_roster_operations_1735@domain.example.com/manage">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 12:36:32.539 ***
REST request fails:
Code: 400
Req: {<0.25485.1>,
      <<"/api/contacts/@invalid/bob_invalid_roster_operations_1735@domain.example.com/manage">>,
      <<"PUT">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"3b75845805429df4">>}],
      <<"{\"action\":\"connect\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 12:36:32 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"27">>}],
         <<"Invalid jid: <<\"@invalid\">>">>,160,886}
Params: #{body => <<"{\"action\":\"connect\"}">>,method => <<"PUT">>,
          path =>
              <<"/api/contacts/@invalid/bob_invalid_roster_operations_1735@domain.example.com/manage">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 12:36:32.541 ***
REST request fails:
Code: 400
Req: {<0.25487.1>,
      <<"/api/contacts/alice_invalid_roster_operations_1735@domain.example.com/@bzzz/manage">>,
      <<"PUT">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"1ec083b73f19d3b1">>}],
      <<"{\"action\":\"connect\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 12:36:32 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"24">>}],
         <<"Invalid jid: <<\"@bzzz\">>">>,157,1268}
Params: #{body => <<"{\"action\":\"connect\"}">>,method => <<"PUT">>,
          path =>
              <<"/api/contacts/alice_invalid_roster_operations_1735@domain.example.com/@bzzz/manage">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 12:36:32.542 ***
bOb_invalid_roster_operations_1735@domain.example.com/res1 out
</stream:stream>

*** User 2022-01-27 12:36:32.542 ***
bOb_invalid_roster_operations_1735@domain.example.com/res1 in
</stream:stream>

*** User 2022-01-27 12:36:32.542 ***
alicE_invalid_roster_operations_1735@domain.example.com/res1 out
</stream:stream>

*** User 2022-01-27 12:36:32.543 ***
alicE_invalid_roster_operations_1735@domain.example.com/res1 in
</stream:stream>
*** CT 2022-01-27 12:36:32.548 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_655.html
*** CT 2022-01-27 12:36:32.550 *** View log from node mongooseim@localhost when finished mongooseim@localhost_2461.html



=== Ended at 2022-01-27 12:36:32
=== successfully completed test case
=== === Returned value: ok