=== Test case: muc_http_api_SUITE:failed_invites/1 (click for source code)

=== Config value:

    [{watchdog,<0.28249.1>},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/muc_http_api_SUITE_data"},
     {preset,"odbc_mssql_mnesia"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@c0783a4ae5cf.2022-02-03_16.28.29/big_tests.tests.muc_http_api_SUITE.logs/run.2022-02-03_16.37.31/muc_http_api_suite.failed_invites.94723.html"},
     {tc_group_properties,[{name,negative},{repeat_until_all_ok,3},parallel]},
     {tc_group_path,[]},
     {data_dir,"/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/muc_http_api_SUITE_data/"},
     {priv_dir,"/home/circleci/project/big_tests/ct_report/ct_run.test@c0783a4ae5cf.2022-02-03_16.28.29/big_tests.tests.muc_http_api_SUITE.logs/run.2022-02-03_16.37.31/log_private/"},
     {escalus_users,[{alice,[{username,<<"alicE">>},
                             {server,<<"localhost">>},
                             {password,<<"matygrysa">>}]},
                     {bob,[{username,<<"bOb">>},
                           {server,<<"localhost">>},
                           {password,<<"makrolika">>}]},
                     {kate,[{username,<<"kate">>},
                            {server,<<"localhost">>},
                            {password,<<"makrowe;p">>}]}]}]

=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@c0783a4ae5cf.2022-02-03_16.28.29"

=== Started at 2022-02-03 16:37:36


*** CT 2022-02-03 16:37:36.720 *** View log from node mongooseim@localhost when started mongooseim@localhost_5418.html
*** CT 2022-02-03 16:37:36.721 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_2338.html

*** User 2022-02-03 16:37:36.751 ***
alicE_failed_invites_1840@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-02-03 16:37:36.751 ***
alicE_failed_invites_1840@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='90b116b13ac09997' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-02-03 16:37:36.752 ***
alicE_failed_invites_1840@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-02-03 16:37:36.752 ***
alicE_failed_invites_1840@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX2ZhaWxlZF9pbnZpdGVzXzE4NDAAbWF0eWdyeXNh</auth>



*** User 2022-02-03 16:37:36.760 ***
alicE_failed_invites_1840@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-02-03 16:37:36.760 ***
alicE_failed_invites_1840@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-02-03 16:37:36.760 ***
alicE_failed_invites_1840@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='793af2c3a61adfa4' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-02-03 16:37:36.760 ***
alicE_failed_invites_1840@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-02-03 16:37:36.760 ***
alicE_failed_invites_1840@localhost/res1 out
<iq type='set' id='0522ec4ff3bcc5282ad9abde6f599f93'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-02-03 16:37:36.760 ***
alicE_failed_invites_1840@localhost/res1 in
<iq id='0522ec4ff3bcc5282ad9abde6f599f93' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alicE_failed_invites_1840@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-02-03 16:37:36.761 ***
alicE_failed_invites_1840@localhost/res1 out
<iq type='set' id='6733f44aee1fcd8b82e71fe73fa3f258'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-02-03 16:37:36.761 ***
alicE_failed_invites_1840@localhost/res1 in
<iq type='result' id='6733f44aee1fcd8b82e71fe73fa3f258'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-02-03 16:37:36.761 ***
alicE_failed_invites_1840@localhost/res1 out
<presence/>



*** User 2022-02-03 16:37:36.764 ***
alicE_failed_invites_1840@localhost/res1 in
<presence from='alicE_failed_invites_1840@localhost/res1' to='alice_failed_invites_1840@localhost/res1' xml:lang='en'/>



*** User 2022-02-03 16:37:36.764 ***
bOb_failed_invites_1840@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-02-03 16:37:36.765 ***
bOb_failed_invites_1840@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='e60951e8ceccfe8b' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-02-03 16:37:36.765 ***
bOb_failed_invites_1840@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-02-03 16:37:36.765 ***
bOb_failed_invites_1840@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9mYWlsZWRfaW52aXRlc18xODQwAG1ha3JvbGlrYQ==</auth>



*** User 2022-02-03 16:37:36.767 ***
bOb_failed_invites_1840@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-02-03 16:37:36.767 ***
bOb_failed_invites_1840@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-02-03 16:37:36.768 ***
bOb_failed_invites_1840@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='265f4f6b644b3a3f' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-02-03 16:37:36.768 ***
bOb_failed_invites_1840@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-02-03 16:37:36.768 ***
bOb_failed_invites_1840@localhost/res1 out
<iq type='set' id='23b9665fcae20134adbcba9fd702b749'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-02-03 16:37:36.768 ***
bOb_failed_invites_1840@localhost/res1 in
<iq id='23b9665fcae20134adbcba9fd702b749' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bOb_failed_invites_1840@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-02-03 16:37:36.768 ***
bOb_failed_invites_1840@localhost/res1 out
<iq type='set' id='1a30a47479919243650a147ba52fa177'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-02-03 16:37:36.769 ***
bOb_failed_invites_1840@localhost/res1 in
<iq type='result' id='1a30a47479919243650a147ba52fa177'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-02-03 16:37:36.769 ***
bOb_failed_invites_1840@localhost/res1 out
<presence/>



*** User 2022-02-03 16:37:36.771 ***
bOb_failed_invites_1840@localhost/res1 in
<presence from='bOb_failed_invites_1840@localhost/res1' to='bob_failed_invites_1840@localhost/res1' xml:lang='en'/>



*** User 2022-02-03 16:37:36.774 ***
REST request:
Code: 201
Req: {<0.28278.1>,<<"/api/mucs/localhost">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"b5f6016ef7bcf9de">>}],
      <<"{\"owner\":\"alicE_failed_invites_1840@localhost\",\"nick\":\"ali\",\"name\":\"wonderland-56.721838\"}">>}
Result: {{<<"201">>,<<"Created">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"location">>,
           <<"http://localhost:8088/api/mucs/localhost/wonderland-56.721838">>},
          {<<"date">>,<<"Thu, 03 Feb 2022 16:37:36 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"20">>}],
         <<"wonderland-56.721838">>,222,2383}
Params: #{body =>
              <<"{\"owner\":\"alicE_failed_invites_1840@localhost\",\"nick\":\"ali\",\"name\":\"wonderland-56.721838\"}">>,
          method => <<"POST">>,path => <<"/api/mucs/localhost">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-02-03 16:37:36.776 ***
REST request fails:
Code: 404
Req: {<0.28280.1>,<<"/api/mucs/localhost/thisroomdoesnotexist/participants">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"fa84910c48f9c33f">>}],
      <<"{\"sender\":\"alicE_failed_invites_1840@localhost\",\"recipient\":\"bOb_failed_invites_1840@localhost\",\"reason\":\"I think you'll like this room!\"}">>}
Result: {{<<"404">>,<<"Not Found">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 03 Feb 2022 16:37:36 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"19">>}],
         <<"room does not exist">>,150,793}
Params: #{body =>
              <<"{\"sender\":\"alicE_failed_invites_1840@localhost\",\"recipient\":\"bOb_failed_invites_1840@localhost\",\"reason\":\"I think you'll like this room!\"}">>,
          method => <<"POST">>,
          path => <<"/api/mucs/localhost/thisroomdoesnotexist/participants">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-02-03 16:37:36.778 ***
REST request fails:
Code: 400
Req: {<0.28286.1>,<<"/api/mucs/localhost/wonderland-56.721838/participants">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"b13d4c72460cd3c5">>}],
      <<"{\"sender\":\"alicE_failed_invites_1840@localhost\",\"recipient\":\"@badjid\",\"reason\":\"I think you'll like this room!\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 03 Feb 2022 16:37:36 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"26">>}],
         <<"Invalid jid: <<\"@badjid\">>">>,159,817}
Params: #{body =>
              <<"{\"sender\":\"alicE_failed_invites_1840@localhost\",\"recipient\":\"@badjid\",\"reason\":\"I think you'll like this room!\"}">>,
          method => <<"POST">>,
          path => <<"/api/mucs/localhost/wonderland-56.721838/participants">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-02-03 16:37:36.780 ***
REST request fails:
Code: 400
Req: {<0.28290.1>,<<"/api/mucs/localhost/wonderland-56.721838/participants">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"dc348a26ae7f6bc5">>}],
      <<"{\"sender\":\"@badjid\",\"recipient\":\"bOb_failed_invites_1840@localhost\",\"reason\":\"I think you'll like this room!\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 03 Feb 2022 16:37:36 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"26">>}],
         <<"Invalid jid: <<\"@badjid\">>">>,159,753}
Params: #{body =>
              <<"{\"sender\":\"@badjid\",\"recipient\":\"bOb_failed_invites_1840@localhost\",\"reason\":\"I think you'll like this room!\"}">>,
          method => <<"POST">>,
          path => <<"/api/mucs/localhost/wonderland-56.721838/participants">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-02-03 16:37:36.780 ***
bOb_failed_invites_1840@localhost/res1 out
</stream:stream>

*** User 2022-02-03 16:37:36.781 ***
bOb_failed_invites_1840@localhost/res1 in
</stream:stream>

*** User 2022-02-03 16:37:36.781 ***
alicE_failed_invites_1840@localhost/res1 out
</stream:stream>

*** User 2022-02-03 16:37:36.781 ***
alicE_failed_invites_1840@localhost/res1 in
</stream:stream>
*** CT 2022-02-03 16:37:36.784 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_2338.html
*** CT 2022-02-03 16:37:36.785 *** View log from node mongooseim@localhost when finished mongooseim@localhost_5418.html



=== Ended at 2022-02-03 16:37:36
=== successfully completed test case
=== === Returned value: ok