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

=== Config value:

    [{watchdog,<0.8480.1>},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/muc_http_api_SUITE_data"},
     {preset,"riak_mnesia"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@8dd706b7fd53.2022-05-18_09.59.49/big_tests.tests.muc_http_api_SUITE.logs/run.2022-05-18_10.10.17/muc_http_api_suite.failed_messages.62722.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@8dd706b7fd53.2022-05-18_09.59.49/big_tests.tests.muc_http_api_SUITE.logs/run.2022-05-18_10.10.17/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@8dd706b7fd53.2022-05-18_09.59.49"

=== Started at 2022-05-18 10:10:22


*** CT 2022-05-18 10:10:22.464 *** View log from node mongooseim@localhost when started mongooseim@localhost_4851.html
*** CT 2022-05-18 10:10:22.465 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_1960.html

*** User 2022-05-18 10:10:22.472 ***
alicE_failed_messages_1186@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-05-18 10:10:22.473 ***
alicE_failed_messages_1186@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='d4dbd4108f998d37' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-05-18 10:10:22.473 ***
alicE_failed_messages_1186@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-05-18 10:10:22.473 ***
alicE_failed_messages_1186@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX2ZhaWxlZF9tZXNzYWdlc18xMTg2AG1hdHlncnlzYQ==</auth>



*** User 2022-05-18 10:10:22.474 ***
alicE_failed_messages_1186@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-05-18 10:10:22.474 ***
alicE_failed_messages_1186@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-05-18 10:10:22.474 ***
alicE_failed_messages_1186@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='d167b78bf8da28ba' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-05-18 10:10:22.475 ***
alicE_failed_messages_1186@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-05-18 10:10:22.475 ***
alicE_failed_messages_1186@localhost/res1 out
<iq type='set' id='db4b478ceb28e9fca919e7bde05c30e3'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-05-18 10:10:22.475 ***
alicE_failed_messages_1186@localhost/res1 in
<iq id='db4b478ceb28e9fca919e7bde05c30e3' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alice_failed_messages_1186@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-05-18 10:10:22.475 ***
alice_failed_messages_1186@localhost/res1 out
<iq type='set' id='b958a3723b2e831f982b2c3e79bb7c51'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-05-18 10:10:22.475 ***
alice_failed_messages_1186@localhost/res1 in
<iq type='result' id='b958a3723b2e831f982b2c3e79bb7c51'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-05-18 10:10:22.475 ***
alice_failed_messages_1186@localhost/res1 out
<presence/>



*** User 2022-05-18 10:10:22.477 ***
alice_failed_messages_1186@localhost/res1 in
<presence from='alice_failed_messages_1186@localhost/res1' to='alice_failed_messages_1186@localhost/res1' xml:lang='en'/>



*** User 2022-05-18 10:10:22.477 ***
bOb_failed_messages_1186@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-05-18 10:10:22.478 ***
bOb_failed_messages_1186@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='f8afd7077f265f8a' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-05-18 10:10:22.478 ***
bOb_failed_messages_1186@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-05-18 10:10:22.478 ***
bOb_failed_messages_1186@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9mYWlsZWRfbWVzc2FnZXNfMTE4NgBtYWtyb2xpa2E=</auth>



*** User 2022-05-18 10:10:22.479 ***
bOb_failed_messages_1186@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-05-18 10:10:22.479 ***
bOb_failed_messages_1186@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-05-18 10:10:22.479 ***
bOb_failed_messages_1186@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='c0ad1f32d0849250' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-05-18 10:10:22.479 ***
bOb_failed_messages_1186@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-05-18 10:10:22.479 ***
bOb_failed_messages_1186@localhost/res1 out
<iq type='set' id='7d69fabcf71660b0164503617519e6ab'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-05-18 10:10:22.480 ***
bOb_failed_messages_1186@localhost/res1 in
<iq id='7d69fabcf71660b0164503617519e6ab' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bob_failed_messages_1186@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-05-18 10:10:22.480 ***
bob_failed_messages_1186@localhost/res1 out
<iq type='set' id='60866effe3abf2d808ec2dc3f3ab7127'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-05-18 10:10:22.480 ***
bob_failed_messages_1186@localhost/res1 in
<iq type='result' id='60866effe3abf2d808ec2dc3f3ab7127'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-05-18 10:10:22.480 ***
bob_failed_messages_1186@localhost/res1 out
<presence/>



*** User 2022-05-18 10:10:22.481 ***
bob_failed_messages_1186@localhost/res1 in
<presence from='bob_failed_messages_1186@localhost/res1' to='bob_failed_messages_1186@localhost/res1' xml:lang='en'/>



*** User 2022-05-18 10:10:22.484 ***
REST request:
Code: 201
Req: {<0.8507.1>,<<"/api/mucs/localhost">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"21e4a5bceb52c828">>}],
      <<"{\"owner\":\"alice_failed_messages_1186@localhost\",\"nick\":\"ali\",\"name\":\"wonderland-22.465605\"}">>}
Result: {{<<"201">>,<<"Created">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"location">>,
           <<"http://localhost:8088/api/mucs/localhost/wonderland-22.465605">>},
          {<<"date">>,<<"Wed, 18 May 2022 10:10:21 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"20">>}],
         <<"wonderland-22.465605">>,222,1985}
Params: #{body =>
              <<"{\"owner\":\"alice_failed_messages_1186@localhost\",\"nick\":\"ali\",\"name\":\"wonderland-22.465605\"}">>,
          method => <<"POST">>,path => <<"/api/mucs/localhost">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-05-18 10:10:22.486 ***
REST request fails:
Code: 404
Req: {<0.8513.1>,<<"/api/mucs/localhost/thisroomdoesnotexist/participants">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"1f2d4e68371301a8">>}],
      <<"{\"sender\":\"alice_failed_messages_1186@localhost\",\"recipient\":\"bob_failed_messages_1186@localhost\",\"reason\":\"I think you'll like this room!\"}">>}
Result: {{<<"404">>,<<"Not Found">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Wed, 18 May 2022 10:10:21 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"14">>}],
         <<"Room not found">>,145,648}
Params: #{body =>
              <<"{\"sender\":\"alice_failed_messages_1186@localhost\",\"recipient\":\"bob_failed_messages_1186@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-05-18 10:10:22.488 ***
REST request fails:
Code: 400
Req: {<0.8517.1>,<<"/api/mucs/localhost/wonderland-22.465605/participants">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"d0fafc16a8adb17b">>}],
      <<"{\"sender\":\"alice_failed_messages_1186@localhost\",\"recipient\":\"@badjid\",\"reason\":\"I think you'll like this room!\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Wed, 18 May 2022 10:10:21 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"26">>}],
         <<"Invalid jid: <<\"@badjid\">>">>,159,583}
Params: #{body =>
              <<"{\"sender\":\"alice_failed_messages_1186@localhost\",\"recipient\":\"@badjid\",\"reason\":\"I think you'll like this room!\"}">>,
          method => <<"POST">>,
          path => <<"/api/mucs/localhost/wonderland-22.465605/participants">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-05-18 10:10:22.489 ***
REST request fails:
Code: 400
Req: {<0.8519.1>,<<"/api/mucs/localhost/wonderland-22.465605/participants">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"4244e89c0e8ca6ee">>}],
      <<"{\"sender\":\"@badjid\",\"recipient\":\"bob_failed_messages_1186@localhost\",\"reason\":\"I think you'll like this room!\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Wed, 18 May 2022 10:10:21 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"26">>}],
         <<"Invalid jid: <<\"@badjid\">>">>,159,587}
Params: #{body =>
              <<"{\"sender\":\"@badjid\",\"recipient\":\"bob_failed_messages_1186@localhost\",\"reason\":\"I think you'll like this room!\"}">>,
          method => <<"POST">>,
          path => <<"/api/mucs/localhost/wonderland-22.465605/participants">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-05-18 10:10:22.489 ***
bob_failed_messages_1186@localhost/res1 out
</stream:stream>

*** User 2022-05-18 10:10:22.490 ***
bob_failed_messages_1186@localhost/res1 in
</stream:stream>

*** User 2022-05-18 10:10:22.490 ***
alice_failed_messages_1186@localhost/res1 out
</stream:stream>

*** User 2022-05-18 10:10:22.490 ***
alice_failed_messages_1186@localhost/res1 in
</stream:stream>
*** CT 2022-05-18 10:10:22.493 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_1960.html
*** CT 2022-05-18 10:10:22.493 *** View log from node mongooseim@localhost when finished mongooseim@localhost_4851.html



=== Ended at 2022-05-18 10:10:22
=== successfully completed test case
=== === Returned value: ok