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

=== Config value:

    [{watchdog,<0.14356.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,"ldap_mnesia"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@12130b74fc81.2022-03-03_10.28.39/big_tests.tests.rest_SUITE.logs/run.2022-03-03_10.38.08/rest_suite.invalid_roster_operations.52739.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@12130b74fc81.2022-03-03_10.28.39/big_tests.tests.rest_SUITE.logs/run.2022-03-03_10.38.08/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@12130b74fc81.2022-03-03_10.28.39"

=== Started at 2022-03-03 10:38:08


*** CT 2022-03-03 10:38:08.904 *** View log from node mongooseim@localhost when started mongooseim@localhost_4993.html
*** CT 2022-03-03 10:38:08.904 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_2342.html

*** User 2022-03-03 10:38:08.910 ***
alicE_invalid_roster_operations_1289@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-03-03 10:38:08.910 ***
alicE_invalid_roster_operations_1289@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='98dec4109404771d' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-03 10:38:08.911 ***
alicE_invalid_roster_operations_1289@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>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-03-03 10:38:08.911 ***
alicE_invalid_roster_operations_1289@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX2ludmFsaWRfcm9zdGVyX29wZXJhdGlvbnNfMTI4OQBtYXR5Z3J5c2E=</auth>



*** User 2022-03-03 10:38:08.912 ***
alicE_invalid_roster_operations_1289@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-03-03 10:38:08.912 ***
alicE_invalid_roster_operations_1289@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-03-03 10:38:08.912 ***
alicE_invalid_roster_operations_1289@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='04050fa4251b68d4' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-03 10:38:08.912 ***
alicE_invalid_roster_operations_1289@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-03-03 10:38:08.912 ***
alicE_invalid_roster_operations_1289@localhost/res1 out
<iq type='set' id='5dae559d9cb243fadd8b5cc8b483f4c6'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-03-03 10:38:08.913 ***
alicE_invalid_roster_operations_1289@localhost/res1 in
<iq id='5dae559d9cb243fadd8b5cc8b483f4c6' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alicE_invalid_roster_operations_1289@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-03-03 10:38:08.913 ***
alicE_invalid_roster_operations_1289@localhost/res1 out
<iq type='set' id='644357f688f7e2f4616054632d1ce828'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-03 10:38:08.913 ***
alicE_invalid_roster_operations_1289@localhost/res1 in
<iq type='result' id='644357f688f7e2f4616054632d1ce828'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-03 10:38:08.913 ***
alicE_invalid_roster_operations_1289@localhost/res1 out
<presence/>



*** User 2022-03-03 10:38:08.914 ***
alicE_invalid_roster_operations_1289@localhost/res1 in
<presence from='alicE_invalid_roster_operations_1289@localhost/res1' to='alice_invalid_roster_operations_1289@localhost/res1' xml:lang='en'/>



*** User 2022-03-03 10:38:08.914 ***
bOb_invalid_roster_operations_1289@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-03-03 10:38:08.915 ***
bOb_invalid_roster_operations_1289@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='ab97e58816656a16' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-03 10:38:08.915 ***
bOb_invalid_roster_operations_1289@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>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-03-03 10:38:08.915 ***
bOb_invalid_roster_operations_1289@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9pbnZhbGlkX3Jvc3Rlcl9vcGVyYXRpb25zXzEyODkAbWFrcm9saWth</auth>



*** User 2022-03-03 10:38:08.916 ***
bOb_invalid_roster_operations_1289@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-03-03 10:38:08.916 ***
bOb_invalid_roster_operations_1289@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-03-03 10:38:08.916 ***
bOb_invalid_roster_operations_1289@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='b4aa00030885e355' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-03 10:38:08.916 ***
bOb_invalid_roster_operations_1289@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-03-03 10:38:08.916 ***
bOb_invalid_roster_operations_1289@localhost/res1 out
<iq type='set' id='a7f1416a801cc71ab687b93b73d711bd'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-03-03 10:38:08.917 ***
bOb_invalid_roster_operations_1289@localhost/res1 in
<iq id='a7f1416a801cc71ab687b93b73d711bd' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bOb_invalid_roster_operations_1289@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-03-03 10:38:08.917 ***
bOb_invalid_roster_operations_1289@localhost/res1 out
<iq type='set' id='a1553009a2d512c93b7d70945ef80c06'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-03 10:38:08.917 ***
bOb_invalid_roster_operations_1289@localhost/res1 in
<iq type='result' id='a1553009a2d512c93b7d70945ef80c06'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-03 10:38:08.917 ***
bOb_invalid_roster_operations_1289@localhost/res1 out
<presence/>



*** User 2022-03-03 10:38:08.918 ***
bOb_invalid_roster_operations_1289@localhost/res1 in
<presence from='bOb_invalid_roster_operations_1289@localhost/res1' to='bob_invalid_roster_operations_1289@localhost/res1' xml:lang='en'/>



*** User 2022-03-03 10:38:08.920 ***
REST request fails:
Code: 400
Req: {<0.14413.1>,
      <<"/api/contacts/alice_invalid_roster_operations_1289@localhost">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"acc8f8a98e755676">>}],
      <<"{\"jid\":\"@invalidjid\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 03 Mar 2022 10:38:08 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"30">>}],
         <<"Invalid jid: <<\"@invalidjid\">>">>,163,628}
Params: #{body => <<"{\"jid\":\"@invalidjid\"}">>,method => <<"POST">>,
          path =>
              <<"/api/contacts/alice_invalid_roster_operations_1289@localhost">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-03 10:38:08.921 ***
REST request fails:
Code: 400
Req: {<0.14421.1>,<<"/api/contacts/@invalid_jid">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"a3fa99e67cbf88ac">>}],
      <<"{\"jid\":\"bob_invalid_roster_operations_1289@localhost\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 03 Mar 2022 10:38:08 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"31">>}],
         <<"Invalid jid: <<\"@invalid_jid\">>">>,164,828}
Params: #{body =>
              <<"{\"jid\":\"bob_invalid_roster_operations_1289@localhost\"}">>,
          method => <<"POST">>,path => <<"/api/contacts/@invalid_jid">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-03 10:38:08.923 ***
REST request:
Code: 204
Req: {<0.14430.1>,
      <<"/api/contacts/alice_invalid_roster_operations_1289@localhost">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"beb073048598be04">>}],
      <<"{\"jid\":\"bob_invalid_roster_operations_1289@localhost\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 03 Mar 2022 10:38:08 GMT">>},
          {<<"content-type">>,<<"application/json">>}],
         <<>>,112,623}
Params: #{body =>
              <<"{\"jid\":\"bob_invalid_roster_operations_1289@localhost\"}">>,
          method => <<"POST">>,
          path =>
              <<"/api/contacts/alice_invalid_roster_operations_1289@localhost">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-03 10:38:08.925 ***
REST request:
Code: 204
Req: {<0.14437.1>,
      <<"/api/contacts/alice_invalid_roster_operations_1289@localhost">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"27283ddf9d5d5836">>}],
      <<"{\"jid\":\"bob_invalid_roster_operations_1289@localhost\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 03 Mar 2022 10:38:08 GMT">>},
          {<<"content-type">>,<<"application/json">>}],
         <<>>,112,638}
Params: #{body =>
              <<"{\"jid\":\"bob_invalid_roster_operations_1289@localhost\"}">>,
          method => <<"POST">>,
          path =>
              <<"/api/contacts/alice_invalid_roster_operations_1289@localhost">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-03 10:38:08.927 ***
REST request fails:
Code: 400
Req: {<0.14441.1>,
      <<"/api/contacts/alice_invalid_roster_operations_1289@localhost/@invalid_jid">>,
      <<"PUT">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"b20efa427a9f2499">>}],
      <<"{\"action\":\"subscribe\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 03 Mar 2022 10:38:08 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"31">>}],
         <<"Invalid jid: <<\"@invalid_jid\">>">>,164,802}
Params: #{body => <<"{\"action\":\"subscribe\"}">>,method => <<"PUT">>,
          path =>
              <<"/api/contacts/alice_invalid_roster_operations_1289@localhost/@invalid_jid">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-03 10:38:08.928 ***
REST request fails:
Code: 400
Req: {<0.14445.1>,
      <<"/api/contacts/@invalid_jid/bob_invalid_roster_operations_1289@localhost">>,
      <<"PUT">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"0886932e83375704">>}],
      <<"{\"action\":\"subscribe\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 03 Mar 2022 10:38:08 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"31">>}],
         <<"Invalid jid: <<\"@invalid_jid\">>">>,164,732}
Params: #{body => <<"{\"action\":\"subscribe\"}">>,method => <<"PUT">>,
          path =>
              <<"/api/contacts/@invalid_jid/bob_invalid_roster_operations_1289@localhost">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-03 10:38:08.930 ***
REST request fails:
Code: 400
Req: {<0.14449.1>,
      <<"/api/contacts/alice_invalid_roster_operations_1289@localhost/bob_invalid_roster_operations_1289@localhost">>,
      <<"PUT">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"67f8b29756338e4c">>}],
      <<"{\"action\":\"something stupid\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 03 Mar 2022 10:38:08 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"14">>}],
         <<"invalid action">>,147,615}
Params: #{body => <<"{\"action\":\"something stupid\"}">>,method => <<"PUT">>,
          path =>
              <<"/api/contacts/alice_invalid_roster_operations_1289@localhost/bob_invalid_roster_operations_1289@localhost">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-03 10:38:08.931 ***
REST request fails:
Code: 400
Req: {<0.14453.1>,
      <<"/api/contacts/alice_invalid_roster_operations_1289@localhost/bob_invalid_roster_operations_1289@localhost/manage">>,
      <<"PUT">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"4bb40c7c833dfab0">>}],
      <<"{\"action\":\"off with his head\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 03 Mar 2022 10:38:08 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"14">>}],
         <<"invalid action">>,147,768}
Params: #{body => <<"{\"action\":\"off with his head\"}">>,
          method => <<"PUT">>,
          path =>
              <<"/api/contacts/alice_invalid_roster_operations_1289@localhost/bob_invalid_roster_operations_1289@localhost/manage">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-03 10:38:08.933 ***
REST request fails:
Code: 400
Req: {<0.14461.1>,
      <<"/api/contacts/@invalid/bob_invalid_roster_operations_1289@localhost/manage">>,
      <<"PUT">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"11bb2cd6084b9d65">>}],
      <<"{\"action\":\"connect\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 03 Mar 2022 10:38:08 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"27">>}],
         <<"Invalid jid: <<\"@invalid\">>">>,160,770}
Params: #{body => <<"{\"action\":\"connect\"}">>,method => <<"PUT">>,
          path =>
              <<"/api/contacts/@invalid/bob_invalid_roster_operations_1289@localhost/manage">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-03 10:38:08.935 ***
REST request fails:
Code: 400
Req: {<0.14465.1>,
      <<"/api/contacts/alice_invalid_roster_operations_1289@localhost/@bzzz/manage">>,
      <<"PUT">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"1a0a772b4bbd6534">>}],
      <<"{\"action\":\"connect\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 03 Mar 2022 10:38:08 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"24">>}],
         <<"Invalid jid: <<\"@bzzz\">>">>,157,766}
Params: #{body => <<"{\"action\":\"connect\"}">>,method => <<"PUT">>,
          path =>
              <<"/api/contacts/alice_invalid_roster_operations_1289@localhost/@bzzz/manage">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-03 10:38:08.935 ***
bOb_invalid_roster_operations_1289@localhost/res1 out
</stream:stream>

*** User 2022-03-03 10:38:08.935 ***
bOb_invalid_roster_operations_1289@localhost/res1 in
</stream:stream>

*** User 2022-03-03 10:38:08.935 ***
alicE_invalid_roster_operations_1289@localhost/res1 out
</stream:stream>

*** User 2022-03-03 10:38:08.936 ***
alicE_invalid_roster_operations_1289@localhost/res1 in
</stream:stream>
*** CT 2022-03-03 10:38:08.937 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_2342.html
*** CT 2022-03-03 10:38:08.938 *** View log from node mongooseim@localhost when finished mongooseim@localhost_4993.html



=== Ended at 2022-03-03 10:38:08
=== successfully completed test case
=== === Returned value: ok