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

=== Config value:

    [{watchdog,<0.27697.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@43a5deef6262.2022-01-27_15.25.11/big_tests.tests.muc_http_api_SUITE.logs/run.2022-01-27_15.34.02/muc_http_api_suite.failed_invites.124290.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@43a5deef6262.2022-01-27_15.25.11/big_tests.tests.muc_http_api_SUITE.logs/run.2022-01-27_15.34.02/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@43a5deef6262.2022-01-27_15.25.11"

=== Started at 2022-01-27 15:34:07


*** CT 2022-01-27 15:34:07.531 *** View log from node mongooseim@localhost when started mongooseim@localhost_5373.html
*** CT 2022-01-27 15:34:07.532 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_2348.html

*** User 2022-01-27 15:34:07.540 ***
alicE_failed_invites_1785@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:34:07.541 ***
alicE_failed_invites_1785@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='273b67134df85393' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-27 15:34:07.541 ***
alicE_failed_invites_1785@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:34:07.541 ***
alicE_failed_invites_1785@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX2ZhaWxlZF9pbnZpdGVzXzE3ODUAbWF0eWdyeXNh</auth>



*** User 2022-01-27 15:34:07.542 ***
alicE_failed_invites_1785@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-01-27 15:34:07.542 ***
alicE_failed_invites_1785@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:34:07.543 ***
alicE_failed_invites_1785@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='e0260feb623a100f' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-27 15:34:07.543 ***
alicE_failed_invites_1785@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:34:07.543 ***
alicE_failed_invites_1785@localhost/res1 out
<iq type='set' id='2e70970f64559d6812706ac4e12c1069'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-01-27 15:34:07.543 ***
alicE_failed_invites_1785@localhost/res1 in
<iq id='2e70970f64559d6812706ac4e12c1069' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alicE_failed_invites_1785@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-01-27 15:34:07.543 ***
alicE_failed_invites_1785@localhost/res1 out
<iq type='set' id='e5c6260b16edae222c02a031f2da0676'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:34:07.543 ***
alicE_failed_invites_1785@localhost/res1 in
<iq type='result' id='e5c6260b16edae222c02a031f2da0676'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:34:07.543 ***
alicE_failed_invites_1785@localhost/res1 out
<presence/>



*** User 2022-01-27 15:34:07.545 ***
alicE_failed_invites_1785@localhost/res1 in
<presence from='alicE_failed_invites_1785@localhost/res1' to='alice_failed_invites_1785@localhost/res1' xml:lang='en'/>



*** User 2022-01-27 15:34:07.546 ***
bOb_failed_invites_1785@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:34:07.546 ***
bOb_failed_invites_1785@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='58b4d2f9e3e04960' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-27 15:34:07.546 ***
bOb_failed_invites_1785@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:34:07.546 ***
bOb_failed_invites_1785@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9mYWlsZWRfaW52aXRlc18xNzg1AG1ha3JvbGlrYQ==</auth>



*** User 2022-01-27 15:34:07.548 ***
bOb_failed_invites_1785@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-01-27 15:34:07.548 ***
bOb_failed_invites_1785@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:34:07.548 ***
bOb_failed_invites_1785@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='02b7f8a3e3304bb5' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-27 15:34:07.548 ***
bOb_failed_invites_1785@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:34:07.548 ***
bOb_failed_invites_1785@localhost/res1 out
<iq type='set' id='89d9d58f75307077e8727ff3dd7642aa'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-01-27 15:34:07.549 ***
bOb_failed_invites_1785@localhost/res1 in
<iq id='89d9d58f75307077e8727ff3dd7642aa' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bOb_failed_invites_1785@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-01-27 15:34:07.549 ***
bOb_failed_invites_1785@localhost/res1 out
<iq type='set' id='17a92f1f4ae9e6734f91fa931e34eae2'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:34:07.549 ***
bOb_failed_invites_1785@localhost/res1 in
<iq type='result' id='17a92f1f4ae9e6734f91fa931e34eae2'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:34:07.549 ***
bOb_failed_invites_1785@localhost/res1 out
<presence/>



*** User 2022-01-27 15:34:07.551 ***
bOb_failed_invites_1785@localhost/res1 in
<presence from='bOb_failed_invites_1785@localhost/res1' to='bob_failed_invites_1785@localhost/res1' xml:lang='en'/>



*** User 2022-01-27 15:34:07.555 ***
REST request:
Code: 201
Req: {<0.27724.1>,<<"/api/mucs/localhost">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"017893f7d3064892">>}],
      <<"{\"owner\":\"alicE_failed_invites_1785@localhost\",\"nick\":\"ali\",\"name\":\"wonderland-47.532422\"}">>}
Result: {{<<"201">>,<<"Created">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"location">>,
           <<"http://localhost:8088/api/mucs/localhost/wonderland-47.532422">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 15:34:06 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"20">>}],
         <<"wonderland-47.532422">>,222,2674}
Params: #{body =>
              <<"{\"owner\":\"alicE_failed_invites_1785@localhost\",\"nick\":\"ali\",\"name\":\"wonderland-47.532422\"}">>,
          method => <<"POST">>,path => <<"/api/mucs/localhost">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 15:34:07.557 ***
REST request fails:
Code: 404
Req: {<0.27728.1>,<<"/api/mucs/localhost/thisroomdoesnotexist/participants">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"d3e7c4002eb26045">>}],
      <<"{\"sender\":\"alicE_failed_invites_1785@localhost\",\"recipient\":\"bOb_failed_invites_1785@localhost\",\"reason\":\"I think you'll like this room!\"}">>}
Result: {{<<"404">>,<<"Not Found">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 15:34:06 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"19">>}],
         <<"room does not exist">>,150,891}
Params: #{body =>
              <<"{\"sender\":\"alicE_failed_invites_1785@localhost\",\"recipient\":\"bOb_failed_invites_1785@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-01-27 15:34:07.559 ***
REST request fails:
Code: 400
Req: {<0.27734.1>,<<"/api/mucs/localhost/wonderland-47.532422/participants">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"167b59c7d6b07812">>}],
      <<"{\"sender\":\"alicE_failed_invites_1785@localhost\",\"recipient\":\"@badjid\",\"reason\":\"I think you'll like this room!\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 15:34:06 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"26">>}],
         <<"Invalid jid: <<\"@badjid\">>">>,159,785}
Params: #{body =>
              <<"{\"sender\":\"alicE_failed_invites_1785@localhost\",\"recipient\":\"@badjid\",\"reason\":\"I think you'll like this room!\"}">>,
          method => <<"POST">>,
          path => <<"/api/mucs/localhost/wonderland-47.532422/participants">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 15:34:07.561 ***
REST request fails:
Code: 400
Req: {<0.27736.1>,<<"/api/mucs/localhost/wonderland-47.532422/participants">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"4956d73f39e5f168">>}],
      <<"{\"sender\":\"@badjid\",\"recipient\":\"bOb_failed_invites_1785@localhost\",\"reason\":\"I think you'll like this room!\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 15:34:06 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"26">>}],
         <<"Invalid jid: <<\"@badjid\">>">>,159,766}
Params: #{body =>
              <<"{\"sender\":\"@badjid\",\"recipient\":\"bOb_failed_invites_1785@localhost\",\"reason\":\"I think you'll like this room!\"}">>,
          method => <<"POST">>,
          path => <<"/api/mucs/localhost/wonderland-47.532422/participants">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 15:34:07.562 ***
bOb_failed_invites_1785@localhost/res1 out
</stream:stream>

*** User 2022-01-27 15:34:07.562 ***
bOb_failed_invites_1785@localhost/res1 in
</stream:stream>

*** User 2022-01-27 15:34:07.562 ***
alicE_failed_invites_1785@localhost/res1 out
</stream:stream>

*** User 2022-01-27 15:34:07.563 ***
alicE_failed_invites_1785@localhost/res1 in
</stream:stream>
*** CT 2022-01-27 15:34:07.566 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_2348.html
*** CT 2022-01-27 15:34:07.567 *** View log from node mongooseim@localhost when finished mongooseim@localhost_5373.html



=== Ended at 2022-01-27 15:34:07
=== successfully completed test case
=== === Returned value: ok