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

=== Config value:

    [{watchdog,<0.2158.1>},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/muc_http_api_SUITE_data"},
     {preset,"ldap_mnesia"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@fbe05ecb9552.2022-03-18_10.50.03/big_tests.tests.muc_http_api_SUITE.logs/run.2022-03-18_10.57.43/muc_http_api_suite.failed_messages.18180.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@fbe05ecb9552.2022-03-18_10.50.03/big_tests.tests.muc_http_api_SUITE.logs/run.2022-03-18_10.57.43/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@fbe05ecb9552.2022-03-18_10.50.03"

=== Started at 2022-03-18 10:57:49


*** CT 2022-03-18 10:57:49.022 *** View log from node mongooseim@localhost when started mongooseim@localhost_4229.html
*** CT 2022-03-18 10:57:49.023 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_1973.html

*** User 2022-03-18 10:57:49.027 ***
alicE_failed_messages_1133@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 10:57:49.027 ***
alicE_failed_messages_1133@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='8add58e98bde7d1f' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-18 10:57:49.028 ***
alicE_failed_messages_1133@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-18 10:57:49.028 ***
alicE_failed_messages_1133@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX2ZhaWxlZF9tZXNzYWdlc18xMTMzAG1hdHlncnlzYQ==</auth>



*** User 2022-03-18 10:57:49.028 ***
alicE_failed_messages_1133@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-03-18 10:57:49.028 ***
alicE_failed_messages_1133@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 10:57:49.029 ***
alicE_failed_messages_1133@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='a88acb81f054d633' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-18 10:57:49.029 ***
alicE_failed_messages_1133@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 10:57:49.029 ***
alicE_failed_messages_1133@localhost/res1 out
<iq type='set' id='d5a10afed6aa0e3646e22ad674de5373'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-03-18 10:57:49.029 ***
alicE_failed_messages_1133@localhost/res1 in
<iq id='d5a10afed6aa0e3646e22ad674de5373' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alicE_failed_messages_1133@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-03-18 10:57:49.029 ***
alicE_failed_messages_1133@localhost/res1 out
<iq type='set' id='6c740323f9875ee4a3403d5f07cdcbc0'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-18 10:57:49.029 ***
alicE_failed_messages_1133@localhost/res1 in
<iq type='result' id='6c740323f9875ee4a3403d5f07cdcbc0'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-18 10:57:49.029 ***
alicE_failed_messages_1133@localhost/res1 out
<presence/>



*** User 2022-03-18 10:57:49.030 ***
alicE_failed_messages_1133@localhost/res1 in
<presence from='alicE_failed_messages_1133@localhost/res1' to='alice_failed_messages_1133@localhost/res1' xml:lang='en'/>



*** User 2022-03-18 10:57:49.030 ***
bOb_failed_messages_1133@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 10:57:49.031 ***
bOb_failed_messages_1133@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='5ae2c77c114f6bae' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-18 10:57:49.031 ***
bOb_failed_messages_1133@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-18 10:57:49.031 ***
bOb_failed_messages_1133@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9mYWlsZWRfbWVzc2FnZXNfMTEzMwBtYWtyb2xpa2E=</auth>



*** User 2022-03-18 10:57:49.032 ***
bOb_failed_messages_1133@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-03-18 10:57:49.032 ***
bOb_failed_messages_1133@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 10:57:49.032 ***
bOb_failed_messages_1133@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='2c2ffe4e0493ddf2' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-18 10:57:49.032 ***
bOb_failed_messages_1133@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 10:57:49.032 ***
bOb_failed_messages_1133@localhost/res1 out
<iq type='set' id='a7dd1a57c27d0102d5becaeaff104cad'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-03-18 10:57:49.032 ***
bOb_failed_messages_1133@localhost/res1 in
<iq id='a7dd1a57c27d0102d5becaeaff104cad' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bOb_failed_messages_1133@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-03-18 10:57:49.032 ***
bOb_failed_messages_1133@localhost/res1 out
<iq type='set' id='3e23bedeaf4508404d79bf5fd36ff5cd'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-18 10:57:49.032 ***
bOb_failed_messages_1133@localhost/res1 in
<iq type='result' id='3e23bedeaf4508404d79bf5fd36ff5cd'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-18 10:57:49.033 ***
bOb_failed_messages_1133@localhost/res1 out
<presence/>



*** User 2022-03-18 10:57:49.033 ***
bOb_failed_messages_1133@localhost/res1 in
<presence from='bOb_failed_messages_1133@localhost/res1' to='bob_failed_messages_1133@localhost/res1' xml:lang='en'/>



*** User 2022-03-18 10:57:49.035 ***
REST request:
Code: 201
Req: {<0.2185.1>,<<"/api/mucs/localhost">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"bab55250a3421167">>}],
      <<"{\"owner\":\"alicE_failed_messages_1133@localhost\",\"nick\":\"ali\",\"name\":\"wonderland-69.23367\"}">>}
Result: {{<<"201">>,<<"Created">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"location">>,
           <<"http://localhost:8088/api/mucs/localhost/wonderland-69.23367">>},
          {<<"date">>,<<"Fri, 18 Mar 2022 10:57:48 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"19">>}],
         <<"wonderland-69.23367">>,220,1044}
Params: #{body =>
              <<"{\"owner\":\"alicE_failed_messages_1133@localhost\",\"nick\":\"ali\",\"name\":\"wonderland-69.23367\"}">>,
          method => <<"POST">>,path => <<"/api/mucs/localhost">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-18 10:57:49.036 ***
REST request fails:
Code: 404
Req: {<0.2189.1>,<<"/api/mucs/localhost/thisroomdoesnotexist/participants">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"f278dabe7ca6ca2c">>}],
      <<"{\"sender\":\"alicE_failed_messages_1133@localhost\",\"recipient\":\"bOb_failed_messages_1133@localhost\",\"reason\":\"I think you'll like this room!\"}">>}
Result: {{<<"404">>,<<"Not Found">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Fri, 18 Mar 2022 10:57:48 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"19">>}],
         <<"room does not exist">>,150,616}
Params: #{body =>
              <<"{\"sender\":\"alicE_failed_messages_1133@localhost\",\"recipient\":\"bOb_failed_messages_1133@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 10:57:49.038 ***
REST request fails:
Code: 400
Req: {<0.2195.1>,<<"/api/mucs/localhost/wonderland-69.23367/participants">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"242bd0e9396f2046">>}],
      <<"{\"sender\":\"alicE_failed_messages_1133@localhost\",\"recipient\":\"@badjid\",\"reason\":\"I think you'll like this room!\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Fri, 18 Mar 2022 10:57:48 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"26">>}],
         <<"Invalid jid: <<\"@badjid\">>">>,159,579}
Params: #{body =>
              <<"{\"sender\":\"alicE_failed_messages_1133@localhost\",\"recipient\":\"@badjid\",\"reason\":\"I think you'll like this room!\"}">>,
          method => <<"POST">>,
          path => <<"/api/mucs/localhost/wonderland-69.23367/participants">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


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


*** User 2022-03-18 10:57:49.040 ***
bOb_failed_messages_1133@localhost/res1 out
</stream:stream>

*** User 2022-03-18 10:57:49.040 ***
bOb_failed_messages_1133@localhost/res1 in
</stream:stream>

*** User 2022-03-18 10:57:49.040 ***
alicE_failed_messages_1133@localhost/res1 out
</stream:stream>

*** User 2022-03-18 10:57:49.040 ***
alicE_failed_messages_1133@localhost/res1 in
</stream:stream>
*** CT 2022-03-18 10:57:49.042 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_1973.html
*** CT 2022-03-18 10:57:49.042 *** View log from node mongooseim@localhost when finished mongooseim@localhost_4229.html



=== Ended at 2022-03-18 10:57:49
=== successfully completed test case
=== === Returned value: ok