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

=== Config value:

    [{watchdog,<0.29917.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@f35493351768.2022-03-18_10.50.10/big_tests.tests.muc_http_api_SUITE.logs/run.2022-03-18_11.00.19/muc_http_api_suite.failed_invites.135810.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@f35493351768.2022-03-18_10.50.10/big_tests.tests.muc_http_api_SUITE.logs/run.2022-03-18_11.00.19/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@f35493351768.2022-03-18_10.50.10"

=== Started at 2022-03-18 11:00:24


*** CT 2022-03-18 11:00:24.992 *** View log from node mongooseim@localhost when started mongooseim@localhost_4339.html
*** CT 2022-03-18 11:00:24.993 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_1963.html

*** User 2022-03-18 11:00:25.019 ***
alicE_failed_invites_2092@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-18 11:00:25.031 ***
alicE_failed_invites_2092@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='e32c762e7c9748c5' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-18 11:00:25.032 ***
alicE_failed_invites_2092@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-03-18 11:00:25.033 ***
alicE_failed_invites_2092@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX2ZhaWxlZF9pbnZpdGVzXzIwOTIAbWF0eWdyeXNh</auth>



*** User 2022-03-18 11:00:25.038 ***
alicE_failed_invites_2092@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-03-18 11:00:25.038 ***
alicE_failed_invites_2092@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-18 11:00:25.039 ***
alicE_failed_invites_2092@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='7fca5a07578c60b4' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-18 11:00:25.039 ***
alicE_failed_invites_2092@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-18 11:00:25.039 ***
alicE_failed_invites_2092@localhost/res1 out
<iq type='set' id='74c91d6273ac18cc07e69787b0f3e54f'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-03-18 11:00:25.040 ***
alicE_failed_invites_2092@localhost/res1 in
<iq id='74c91d6273ac18cc07e69787b0f3e54f' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alicE_failed_invites_2092@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-03-18 11:00:25.041 ***
alicE_failed_invites_2092@localhost/res1 out
<iq type='set' id='32472bbd2a289c5ab6413ed197123e91'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-18 11:00:25.041 ***
alicE_failed_invites_2092@localhost/res1 in
<iq type='result' id='32472bbd2a289c5ab6413ed197123e91'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-18 11:00:25.041 ***
alicE_failed_invites_2092@localhost/res1 out
<presence/>



*** User 2022-03-18 11:00:25.044 ***
alicE_failed_invites_2092@localhost/res1 in
<presence from='alicE_failed_invites_2092@localhost/res1' to='alice_failed_invites_2092@localhost/res1' xml:lang='en'/>



*** User 2022-03-18 11:00:25.045 ***
bOb_failed_invites_2092@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-18 11:00:25.045 ***
bOb_failed_invites_2092@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='5c0c32c313d23bc4' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-18 11:00:25.046 ***
bOb_failed_invites_2092@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-03-18 11:00:25.046 ***
bOb_failed_invites_2092@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9mYWlsZWRfaW52aXRlc18yMDkyAG1ha3JvbGlrYQ==</auth>



*** User 2022-03-18 11:00:25.047 ***
bOb_failed_invites_2092@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-03-18 11:00:25.047 ***
bOb_failed_invites_2092@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-18 11:00:25.048 ***
bOb_failed_invites_2092@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='118dd664e75f6f90' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-18 11:00:25.048 ***
bOb_failed_invites_2092@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-18 11:00:25.048 ***
bOb_failed_invites_2092@localhost/res1 out
<iq type='set' id='c317b525f1e7a565c917af122b4b2c8d'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-03-18 11:00:25.049 ***
bOb_failed_invites_2092@localhost/res1 in
<iq id='c317b525f1e7a565c917af122b4b2c8d' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bOb_failed_invites_2092@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-03-18 11:00:25.049 ***
bOb_failed_invites_2092@localhost/res1 out
<iq type='set' id='5fa3ca88d6642c1d386c79105ce24bbd'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-18 11:00:25.049 ***
bOb_failed_invites_2092@localhost/res1 in
<iq type='result' id='5fa3ca88d6642c1d386c79105ce24bbd'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-18 11:00:25.049 ***
bOb_failed_invites_2092@localhost/res1 out
<presence/>



*** User 2022-03-18 11:00:25.053 ***
bOb_failed_invites_2092@localhost/res1 in
<presence from='bOb_failed_invites_2092@localhost/res1' to='bob_failed_invites_2092@localhost/res1' xml:lang='en'/>



*** User 2022-03-18 11:00:25.057 ***
REST request:
Code: 201
Req: {<0.29946.1>,<<"/api/mucs/localhost">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"9b2b07a529da6c3e">>}],
      <<"{\"owner\":\"alicE_failed_invites_2092@localhost\",\"nick\":\"ali\",\"name\":\"wonderland-24.994217\"}">>}
Result: {{<<"201">>,<<"Created">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"location">>,
           <<"http://localhost:8088/api/mucs/localhost/wonderland-24.994217">>},
          {<<"date">>,<<"Fri, 18 Mar 2022 11:00:25 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"20">>}],
         <<"wonderland-24.994217">>,222,2860}
Params: #{body =>
              <<"{\"owner\":\"alicE_failed_invites_2092@localhost\",\"nick\":\"ali\",\"name\":\"wonderland-24.994217\"}">>,
          method => <<"POST">>,path => <<"/api/mucs/localhost">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-18 11:00:25.059 ***
REST request fails:
Code: 404
Req: {<0.29950.1>,<<"/api/mucs/localhost/thisroomdoesnotexist/participants">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"39f2f840d60f1185">>}],
      <<"{\"sender\":\"alicE_failed_invites_2092@localhost\",\"recipient\":\"bOb_failed_invites_2092@localhost\",\"reason\":\"I think you'll like this room!\"}">>}
Result: {{<<"404">>,<<"Not Found">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Fri, 18 Mar 2022 11:00:25 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"19">>}],
         <<"room does not exist">>,150,891}
Params: #{body =>
              <<"{\"sender\":\"alicE_failed_invites_2092@localhost\",\"recipient\":\"bOb_failed_invites_2092@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-03-18 11:00:25.061 ***
REST request fails:
Code: 400
Req: {<0.29954.1>,<<"/api/mucs/localhost/wonderland-24.994217/participants">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"1e24ba6793094fcd">>}],
      <<"{\"sender\":\"alicE_failed_invites_2092@localhost\",\"recipient\":\"@badjid\",\"reason\":\"I think you'll like this room!\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Fri, 18 Mar 2022 11:00:25 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"26">>}],
         <<"Invalid jid: <<\"@badjid\">>">>,159,1416}
Params: #{body =>
              <<"{\"sender\":\"alicE_failed_invites_2092@localhost\",\"recipient\":\"@badjid\",\"reason\":\"I think you'll like this room!\"}">>,
          method => <<"POST">>,
          path => <<"/api/mucs/localhost/wonderland-24.994217/participants">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-18 11:00:25.063 ***
REST request fails:
Code: 400
Req: {<0.29958.1>,<<"/api/mucs/localhost/wonderland-24.994217/participants">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"c4c81deb8f028684">>}],
      <<"{\"sender\":\"@badjid\",\"recipient\":\"bOb_failed_invites_2092@localhost\",\"reason\":\"I think you'll like this room!\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Fri, 18 Mar 2022 11:00:25 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"26">>}],
         <<"Invalid jid: <<\"@badjid\">>">>,159,645}
Params: #{body =>
              <<"{\"sender\":\"@badjid\",\"recipient\":\"bOb_failed_invites_2092@localhost\",\"reason\":\"I think you'll like this room!\"}">>,
          method => <<"POST">>,
          path => <<"/api/mucs/localhost/wonderland-24.994217/participants">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-18 11:00:25.063 ***
bOb_failed_invites_2092@localhost/res1 out
</stream:stream>

*** User 2022-03-18 11:00:25.063 ***
bOb_failed_invites_2092@localhost/res1 in
</stream:stream>

*** User 2022-03-18 11:00:25.063 ***
alicE_failed_invites_2092@localhost/res1 out
</stream:stream>

*** User 2022-03-18 11:00:25.064 ***
alicE_failed_invites_2092@localhost/res1 in
</stream:stream>
*** CT 2022-03-18 11:00:25.066 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_1963.html
*** CT 2022-03-18 11:00:25.067 *** View log from node mongooseim@localhost when finished mongooseim@localhost_4339.html



=== Ended at 2022-03-18 11:00:25
=== successfully completed test case
=== === Returned value: ok