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

=== Config value:

    [{watchdog,<0.2145.2>},
     {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@6949c6250523.2022-05-25_10.37.44/big_tests.tests.muc_http_api_SUITE.logs/run.2022-05-25_10.46.08/muc_http_api_suite.failed_messages.132098.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@6949c6250523.2022-05-25_10.37.44/big_tests.tests.muc_http_api_SUITE.logs/run.2022-05-25_10.46.08/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@6949c6250523.2022-05-25_10.37.44"

=== Started at 2022-05-25 10:46:13


*** CT 2022-05-25 10:46:13.981 *** View log from node mongooseim@localhost when started mongooseim@localhost_5083.html
*** CT 2022-05-25 10:46:13.981 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_1929.html

*** User 2022-05-25 10:46:13.988 ***
alicE_failed_messages_2052@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-25 10:46:13.988 ***
alicE_failed_messages_2052@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='44d77992a5247b5c' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-05-25 10:46:13.988 ***
alicE_failed_messages_2052@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-25 10:46:13.989 ***
alicE_failed_messages_2052@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX2ZhaWxlZF9tZXNzYWdlc18yMDUyAG1hdHlncnlzYQ==</auth>



*** User 2022-05-25 10:46:13.989 ***
alicE_failed_messages_2052@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-05-25 10:46:13.989 ***
alicE_failed_messages_2052@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-25 10:46:13.989 ***
alicE_failed_messages_2052@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='0358d90226b94a38' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-05-25 10:46:13.990 ***
alicE_failed_messages_2052@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-25 10:46:13.990 ***
alicE_failed_messages_2052@localhost/res1 out
<iq type='set' id='0e5bf7a08a471b2e1482e8c97ca5624f'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-05-25 10:46:13.990 ***
alicE_failed_messages_2052@localhost/res1 in
<iq id='0e5bf7a08a471b2e1482e8c97ca5624f' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alice_failed_messages_2052@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-05-25 10:46:13.990 ***
alice_failed_messages_2052@localhost/res1 out
<iq type='set' id='8e793de50b209e99a0c7a5f0ee73c6d6'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-05-25 10:46:13.990 ***
alice_failed_messages_2052@localhost/res1 in
<iq type='result' id='8e793de50b209e99a0c7a5f0ee73c6d6'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-05-25 10:46:13.990 ***
alice_failed_messages_2052@localhost/res1 out
<presence/>



*** User 2022-05-25 10:46:13.992 ***
alice_failed_messages_2052@localhost/res1 in
<presence from='alice_failed_messages_2052@localhost/res1' to='alice_failed_messages_2052@localhost/res1' xml:lang='en'/>



*** User 2022-05-25 10:46:13.992 ***
bOb_failed_messages_2052@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-25 10:46:13.993 ***
bOb_failed_messages_2052@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='62299d6d8aea3d4f' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-05-25 10:46:13.993 ***
bOb_failed_messages_2052@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-25 10:46:13.993 ***
bOb_failed_messages_2052@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9mYWlsZWRfbWVzc2FnZXNfMjA1MgBtYWtyb2xpa2E=</auth>



*** User 2022-05-25 10:46:13.994 ***
bOb_failed_messages_2052@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-05-25 10:46:13.994 ***
bOb_failed_messages_2052@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-25 10:46:13.994 ***
bOb_failed_messages_2052@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='6bd62e9a9af49119' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-05-25 10:46:13.994 ***
bOb_failed_messages_2052@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-25 10:46:13.994 ***
bOb_failed_messages_2052@localhost/res1 out
<iq type='set' id='fa836c9ad690d1bb89a32bb2f468a66a'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-05-25 10:46:13.994 ***
bOb_failed_messages_2052@localhost/res1 in
<iq id='fa836c9ad690d1bb89a32bb2f468a66a' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bob_failed_messages_2052@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-05-25 10:46:13.994 ***
bob_failed_messages_2052@localhost/res1 out
<iq type='set' id='50b838db1e8bab10e98d2ed6bbcb8e52'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-05-25 10:46:13.995 ***
bob_failed_messages_2052@localhost/res1 in
<iq type='result' id='50b838db1e8bab10e98d2ed6bbcb8e52'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-05-25 10:46:13.995 ***
bob_failed_messages_2052@localhost/res1 out
<presence/>



*** User 2022-05-25 10:46:13.996 ***
bob_failed_messages_2052@localhost/res1 in
<presence from='bob_failed_messages_2052@localhost/res1' to='bob_failed_messages_2052@localhost/res1' xml:lang='en'/>



*** User 2022-05-25 10:46:13.999 ***
REST request:
Code: 201
Req: {<0.2172.2>,<<"/api/mucs/localhost">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"73834f6e820810cf">>}],
      <<"{\"owner\":\"alice_failed_messages_2052@localhost\",\"nick\":\"ali\",\"name\":\"wonderland-73.981895\"}">>}
Result: {{<<"201">>,<<"Created">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"location">>,
           <<"http://localhost:8088/api/mucs/localhost/wonderland-73.981895">>},
          {<<"date">>,<<"Wed, 25 May 2022 10:46:13 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"20">>}],
         <<"wonderland-73.981895">>,222,2161}
Params: #{body =>
              <<"{\"owner\":\"alice_failed_messages_2052@localhost\",\"nick\":\"ali\",\"name\":\"wonderland-73.981895\"}">>,
          method => <<"POST">>,path => <<"/api/mucs/localhost">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-05-25 10:46:14.001 ***
REST request fails:
Code: 404
Req: {<0.2176.2>,<<"/api/mucs/localhost/thisroomdoesnotexist/participants">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"8ede2f17fa34de51">>}],
      <<"{\"sender\":\"alice_failed_messages_2052@localhost\",\"recipient\":\"bob_failed_messages_2052@localhost\",\"reason\":\"I think you'll like this room!\"}">>}
Result: {{<<"404">>,<<"Not Found">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Wed, 25 May 2022 10:46:13 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"14">>}],
         <<"Room not found">>,145,1059}
Params: #{body =>
              <<"{\"sender\":\"alice_failed_messages_2052@localhost\",\"recipient\":\"bob_failed_messages_2052@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-25 10:46:14.003 ***
REST request fails:
Code: 400
Req: {<0.2180.2>,<<"/api/mucs/localhost/wonderland-73.981895/participants">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"3f5bab5d14af6700">>}],
      <<"{\"sender\":\"alice_failed_messages_2052@localhost\",\"recipient\":\"@badjid\",\"reason\":\"I think you'll like this room!\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Wed, 25 May 2022 10:46:13 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"26">>}],
         <<"Invalid jid: <<\"@badjid\">>">>,159,696}
Params: #{body =>
              <<"{\"sender\":\"alice_failed_messages_2052@localhost\",\"recipient\":\"@badjid\",\"reason\":\"I think you'll like this room!\"}">>,
          method => <<"POST">>,
          path => <<"/api/mucs/localhost/wonderland-73.981895/participants">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


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


*** User 2022-05-25 10:46:14.006 ***
bob_failed_messages_2052@localhost/res1 out
</stream:stream>

*** User 2022-05-25 10:46:14.006 ***
bob_failed_messages_2052@localhost/res1 in
</stream:stream>

*** User 2022-05-25 10:46:14.006 ***
alice_failed_messages_2052@localhost/res1 out
</stream:stream>

*** User 2022-05-25 10:46:14.006 ***
alice_failed_messages_2052@localhost/res1 in
</stream:stream>
*** CT 2022-05-25 10:46:14.009 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_1929.html
*** CT 2022-05-25 10:46:14.010 *** View log from node mongooseim@localhost when finished mongooseim@localhost_5083.html



=== Ended at 2022-05-25 10:46:14
=== successfully completed test case
=== === Returned value: ok