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

=== Config value:

    [{watchdog,<0.19524.1>},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/muc_http_api_SUITE_data"},
     {preset,"pgsql_mnesia"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@7a520fcf4274.2022-02-02_15.07.36/big_tests.tests.muc_http_api_SUITE.logs/run.2022-02-02_15.14.00/muc_http_api_suite.failed_invites.128642.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@7a520fcf4274.2022-02-02_15.07.36/big_tests.tests.muc_http_api_SUITE.logs/run.2022-02-02_15.14.00/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">>}]},
                     {kate,[{username,<<"kate">>},
                            {server,<<"domain.example.com">>},
                            {host,<<"localhost">>},
                            {password,<<"makrowe;p">>}]}]}]

=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@7a520fcf4274.2022-02-02_15.07.36"

=== Started at 2022-02-02 15:14:05


*** CT 2022-02-02 15:14:05.714 *** View log from node mongooseim@localhost when started mongooseim@localhost_2244.html
*** CT 2022-02-02 15:14:05.714 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_591.html

*** User 2022-02-02 15:14:05.732 ***
alicE_failed_invites_1520@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-02-02 15:14:05.732 ***
alicE_failed_invites_1520@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='649b04299d69134d' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-02-02 15:14:05.732 ***
alicE_failed_invites_1520@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-02-02 15:14:05.732 ***
alicE_failed_invites_1520@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX2ZhaWxlZF9pbnZpdGVzXzE1MjAAbWF0eWdyeXNh</auth>



*** User 2022-02-02 15:14:05.734 ***
alicE_failed_invites_1520@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-02-02 15:14:05.734 ***
alicE_failed_invites_1520@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-02-02 15:14:05.734 ***
alicE_failed_invites_1520@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='c142024233e6be45' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-02-02 15:14:05.734 ***
alicE_failed_invites_1520@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-02-02 15:14:05.735 ***
alicE_failed_invites_1520@domain.example.com/res1 out
<iq type='set' id='a9e97dacecdda7fcb63be5656b5d0a16'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-02-02 15:14:05.735 ***
alicE_failed_invites_1520@domain.example.com/res1 in
<iq id='a9e97dacecdda7fcb63be5656b5d0a16' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alicE_failed_invites_1520@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2022-02-02 15:14:05.735 ***
alicE_failed_invites_1520@domain.example.com/res1 out
<iq type='set' id='1a0353dd532e2a54809a6c796042b327'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-02-02 15:14:05.735 ***
alicE_failed_invites_1520@domain.example.com/res1 in
<iq type='result' id='1a0353dd532e2a54809a6c796042b327'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-02-02 15:14:05.735 ***
alicE_failed_invites_1520@domain.example.com/res1 out
<presence/>



*** User 2022-02-02 15:14:05.736 ***
alicE_failed_invites_1520@domain.example.com/res1 in
<presence from='alicE_failed_invites_1520@domain.example.com/res1' to='alice_failed_invites_1520@domain.example.com/res1' xml:lang='en'/>



*** User 2022-02-02 15:14:05.737 ***
bOb_failed_invites_1520@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-02-02 15:14:05.737 ***
bOb_failed_invites_1520@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='07b0fcf5c38287de' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-02-02 15:14:05.737 ***
bOb_failed_invites_1520@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-02-02 15:14:05.737 ***
bOb_failed_invites_1520@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9mYWlsZWRfaW52aXRlc18xNTIwAG1ha3JvbGlrYQ==</auth>



*** User 2022-02-02 15:14:05.738 ***
bOb_failed_invites_1520@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-02-02 15:14:05.738 ***
bOb_failed_invites_1520@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-02-02 15:14:05.738 ***
bOb_failed_invites_1520@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='7f078cfc60bb6a5d' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-02-02 15:14:05.738 ***
bOb_failed_invites_1520@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-02-02 15:14:05.738 ***
bOb_failed_invites_1520@domain.example.com/res1 out
<iq type='set' id='c74f307bf37fd3a07968445cd225ccbb'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-02-02 15:14:05.738 ***
bOb_failed_invites_1520@domain.example.com/res1 in
<iq id='c74f307bf37fd3a07968445cd225ccbb' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bOb_failed_invites_1520@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2022-02-02 15:14:05.739 ***
bOb_failed_invites_1520@domain.example.com/res1 out
<iq type='set' id='dffcf73eb0b3c252497ab30359ef8c14'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-02-02 15:14:05.739 ***
bOb_failed_invites_1520@domain.example.com/res1 in
<iq type='result' id='dffcf73eb0b3c252497ab30359ef8c14'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-02-02 15:14:05.739 ***
bOb_failed_invites_1520@domain.example.com/res1 out
<presence/>



*** User 2022-02-02 15:14:05.740 ***
bOb_failed_invites_1520@domain.example.com/res1 in
<presence from='bOb_failed_invites_1520@domain.example.com/res1' to='bob_failed_invites_1520@domain.example.com/res1' xml:lang='en'/>



*** User 2022-02-02 15:14:05.742 ***
REST request:
Code: 201
Req: {<0.19551.1>,<<"/api/mucs/domain.example.com">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"20c8bc9cfb3f7571">>}],
      <<"{\"owner\":\"alicE_failed_invites_1520@domain.example.com\",\"nick\":\"ali\",\"name\":\"wonderland-45.715243\"}">>}
Result: {{<<"201">>,<<"Created">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"location">>,
           <<"http://localhost:8088/api/mucs/domain.example.com/wonderland-45.715243">>},
          {<<"date">>,<<"Wed, 02 Feb 2022 15:14:05 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"20">>}],
         <<"wonderland-45.715243">>,231,1655}
Params: #{body =>
              <<"{\"owner\":\"alicE_failed_invites_1520@domain.example.com\",\"nick\":\"ali\",\"name\":\"wonderland-45.715243\"}">>,
          method => <<"POST">>,path => <<"/api/mucs/domain.example.com">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-02-02 15:14:05.744 ***
REST request fails:
Code: 404
Req: {<0.19555.1>,
      <<"/api/mucs/domain.example.com/thisroomdoesnotexist/participants">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"ff3427b30df2a53f">>}],
      <<"{\"sender\":\"alicE_failed_invites_1520@domain.example.com\",\"recipient\":\"bOb_failed_invites_1520@domain.example.com\",\"reason\":\"I think you'll like this room!\"}">>}
Result: {{<<"404">>,<<"Not Found">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Wed, 02 Feb 2022 15:14:05 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"19">>}],
         <<"room does not exist">>,150,980}
Params: #{body =>
              <<"{\"sender\":\"alicE_failed_invites_1520@domain.example.com\",\"recipient\":\"bOb_failed_invites_1520@domain.example.com\",\"reason\":\"I think you'll like this room!\"}">>,
          method => <<"POST">>,
          path =>
              <<"/api/mucs/domain.example.com/thisroomdoesnotexist/participants">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-02-02 15:14:05.746 ***
REST request fails:
Code: 400
Req: {<0.19559.1>,
      <<"/api/mucs/domain.example.com/wonderland-45.715243/participants">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"57caca890db5b7f1">>}],
      <<"{\"sender\":\"alicE_failed_invites_1520@domain.example.com\",\"recipient\":\"@badjid\",\"reason\":\"I think you'll like this room!\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Wed, 02 Feb 2022 15:14:05 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"26">>}],
         <<"Invalid jid: <<\"@badjid\">>">>,159,1073}
Params: #{body =>
              <<"{\"sender\":\"alicE_failed_invites_1520@domain.example.com\",\"recipient\":\"@badjid\",\"reason\":\"I think you'll like this room!\"}">>,
          method => <<"POST">>,
          path =>
              <<"/api/mucs/domain.example.com/wonderland-45.715243/participants">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-02-02 15:14:05.748 ***
REST request fails:
Code: 400
Req: {<0.19563.1>,
      <<"/api/mucs/domain.example.com/wonderland-45.715243/participants">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"4a3a9efd78383e5a">>}],
      <<"{\"sender\":\"@badjid\",\"recipient\":\"bOb_failed_invites_1520@domain.example.com\",\"reason\":\"I think you'll like this room!\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Wed, 02 Feb 2022 15:14:05 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"26">>}],
         <<"Invalid jid: <<\"@badjid\">>">>,159,735}
Params: #{body =>
              <<"{\"sender\":\"@badjid\",\"recipient\":\"bOb_failed_invites_1520@domain.example.com\",\"reason\":\"I think you'll like this room!\"}">>,
          method => <<"POST">>,
          path =>
              <<"/api/mucs/domain.example.com/wonderland-45.715243/participants">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-02-02 15:14:05.748 ***
bOb_failed_invites_1520@domain.example.com/res1 out
</stream:stream>

*** User 2022-02-02 15:14:05.749 ***
bOb_failed_invites_1520@domain.example.com/res1 in
</stream:stream>

*** User 2022-02-02 15:14:05.749 ***
alicE_failed_invites_1520@domain.example.com/res1 out
</stream:stream>

*** User 2022-02-02 15:14:05.749 ***
alicE_failed_invites_1520@domain.example.com/res1 in
</stream:stream>
*** CT 2022-02-02 15:14:05.751 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_591.html
*** CT 2022-02-02 15:14:05.752 *** View log from node mongooseim@localhost when finished mongooseim@localhost_2244.html



=== Ended at 2022-02-02 15:14:05
=== successfully completed test case
=== === Returned value: ok