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

=== Config value:

    [{watchdog,<0.2512.1>},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/muc_http_api_SUITE_data"},
     {preset,"internal_mnesia"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@a1e626d02594.2022-03-07_08.29.41/big_tests.tests.muc_http_api_SUITE.logs/run.2022-03-07_08.37.57/muc_http_api_suite.failed_messages.32387.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@a1e626d02594.2022-03-07_08.29.41/big_tests.tests.muc_http_api_SUITE.logs/run.2022-03-07_08.37.57/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@a1e626d02594.2022-03-07_08.29.41"

=== Started at 2022-03-07 08:38:02


*** CT 2022-03-07 08:38:02.916 *** View log from node mongooseim@localhost when started mongooseim@localhost_4504.html
*** CT 2022-03-07 08:38:02.916 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_2168.html

*** User 2022-03-07 08:38:02.919 ***
alicE_failed_messages_1033@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-07 08:38:02.920 ***
alicE_failed_messages_1033@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='d261f64cdc106fc8' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-07 08:38:02.920 ***
alicE_failed_messages_1033@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-07 08:38:02.920 ***
alicE_failed_messages_1033@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX2ZhaWxlZF9tZXNzYWdlc18xMDMzAG1hdHlncnlzYQ==</auth>



*** User 2022-03-07 08:38:02.920 ***
alicE_failed_messages_1033@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-03-07 08:38:02.920 ***
alicE_failed_messages_1033@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-07 08:38:02.920 ***
alicE_failed_messages_1033@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='d0855e568bf11c35' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-07 08:38:02.920 ***
alicE_failed_messages_1033@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-07 08:38:02.921 ***
alicE_failed_messages_1033@localhost/res1 out
<iq type='set' id='c8a193d4253f9ec0bca105040a7a6224'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-03-07 08:38:02.921 ***
alicE_failed_messages_1033@localhost/res1 in
<iq id='c8a193d4253f9ec0bca105040a7a6224' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alicE_failed_messages_1033@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-03-07 08:38:02.921 ***
alicE_failed_messages_1033@localhost/res1 out
<iq type='set' id='5f954742d461a7b213b78949b9430192'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-07 08:38:02.921 ***
alicE_failed_messages_1033@localhost/res1 in
<iq type='result' id='5f954742d461a7b213b78949b9430192'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-07 08:38:02.921 ***
alicE_failed_messages_1033@localhost/res1 out
<presence/>



*** User 2022-03-07 08:38:02.922 ***
alicE_failed_messages_1033@localhost/res1 in
<presence from='alicE_failed_messages_1033@localhost/res1' to='alice_failed_messages_1033@localhost/res1' xml:lang='en'/>



*** User 2022-03-07 08:38:02.922 ***
bOb_failed_messages_1033@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-07 08:38:02.923 ***
bOb_failed_messages_1033@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='1ce40944a8ac39f5' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-07 08:38:02.923 ***
bOb_failed_messages_1033@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-07 08:38:02.923 ***
bOb_failed_messages_1033@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9mYWlsZWRfbWVzc2FnZXNfMTAzMwBtYWtyb2xpa2E=</auth>



*** User 2022-03-07 08:38:02.923 ***
bOb_failed_messages_1033@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-03-07 08:38:02.923 ***
bOb_failed_messages_1033@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-07 08:38:02.924 ***
bOb_failed_messages_1033@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='e1307d2b4707984b' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-07 08:38:02.924 ***
bOb_failed_messages_1033@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-07 08:38:02.924 ***
bOb_failed_messages_1033@localhost/res1 out
<iq type='set' id='d514f5ae0ab7178fa1880c6f07ca4b5e'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-03-07 08:38:02.924 ***
bOb_failed_messages_1033@localhost/res1 in
<iq id='d514f5ae0ab7178fa1880c6f07ca4b5e' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bOb_failed_messages_1033@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-03-07 08:38:02.924 ***
bOb_failed_messages_1033@localhost/res1 out
<iq type='set' id='ca6fcd711415553dad2752948e29b71e'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-07 08:38:02.924 ***
bOb_failed_messages_1033@localhost/res1 in
<iq type='result' id='ca6fcd711415553dad2752948e29b71e'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-07 08:38:02.924 ***
bOb_failed_messages_1033@localhost/res1 out
<presence/>



*** User 2022-03-07 08:38:02.925 ***
bOb_failed_messages_1033@localhost/res1 in
<presence from='bOb_failed_messages_1033@localhost/res1' to='bob_failed_messages_1033@localhost/res1' xml:lang='en'/>



*** User 2022-03-07 08:38:02.927 ***
REST request:
Code: 201
Req: {<0.2541.1>,<<"/api/mucs/localhost">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"518708c9143990f4">>}],
      <<"{\"owner\":\"alicE_failed_messages_1033@localhost\",\"nick\":\"ali\",\"name\":\"wonderland-82.917006\"}">>}
Result: {{<<"201">>,<<"Created">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"location">>,
           <<"http://localhost:8088/api/mucs/localhost/wonderland-82.917006">>},
          {<<"date">>,<<"Mon, 07 Mar 2022 08:38:02 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"20">>}],
         <<"wonderland-82.917006">>,222,1183}
Params: #{body =>
              <<"{\"owner\":\"alicE_failed_messages_1033@localhost\",\"nick\":\"ali\",\"name\":\"wonderland-82.917006\"}">>,
          method => <<"POST">>,path => <<"/api/mucs/localhost">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-07 08:38:02.929 ***
REST request fails:
Code: 404
Req: {<0.2543.1>,<<"/api/mucs/localhost/thisroomdoesnotexist/participants">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"6b50f2377d35557a">>}],
      <<"{\"sender\":\"alicE_failed_messages_1033@localhost\",\"recipient\":\"bOb_failed_messages_1033@localhost\",\"reason\":\"I think you'll like this room!\"}">>}
Result: {{<<"404">>,<<"Not Found">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 07 Mar 2022 08:38:02 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"19">>}],
         <<"room does not exist">>,150,822}
Params: #{body =>
              <<"{\"sender\":\"alicE_failed_messages_1033@localhost\",\"recipient\":\"bOb_failed_messages_1033@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-07 08:38:02.931 ***
REST request fails:
Code: 400
Req: {<0.2547.1>,<<"/api/mucs/localhost/wonderland-82.917006/participants">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"b9f72d00d3e05bb6">>}],
      <<"{\"sender\":\"alicE_failed_messages_1033@localhost\",\"recipient\":\"@badjid\",\"reason\":\"I think you'll like this room!\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 07 Mar 2022 08:38:02 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"26">>}],
         <<"Invalid jid: <<\"@badjid\">>">>,159,736}
Params: #{body =>
              <<"{\"sender\":\"alicE_failed_messages_1033@localhost\",\"recipient\":\"@badjid\",\"reason\":\"I think you'll like this room!\"}">>,
          method => <<"POST">>,
          path => <<"/api/mucs/localhost/wonderland-82.917006/participants">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-07 08:38:02.933 ***
REST request fails:
Code: 400
Req: {<0.2553.1>,<<"/api/mucs/localhost/wonderland-82.917006/participants">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"f8763b70d88ffef5">>}],
      <<"{\"sender\":\"@badjid\",\"recipient\":\"bOb_failed_messages_1033@localhost\",\"reason\":\"I think you'll like this room!\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 07 Mar 2022 08:38:02 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"26">>}],
         <<"Invalid jid: <<\"@badjid\">>">>,159,770}
Params: #{body =>
              <<"{\"sender\":\"@badjid\",\"recipient\":\"bOb_failed_messages_1033@localhost\",\"reason\":\"I think you'll like this room!\"}">>,
          method => <<"POST">>,
          path => <<"/api/mucs/localhost/wonderland-82.917006/participants">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-07 08:38:02.933 ***
bOb_failed_messages_1033@localhost/res1 out
</stream:stream>

*** User 2022-03-07 08:38:02.933 ***
bOb_failed_messages_1033@localhost/res1 in
</stream:stream>

*** User 2022-03-07 08:38:02.934 ***
alicE_failed_messages_1033@localhost/res1 out
</stream:stream>

*** User 2022-03-07 08:38:02.934 ***
alicE_failed_messages_1033@localhost/res1 in
</stream:stream>
*** CT 2022-03-07 08:38:02.936 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_2168.html
*** CT 2022-03-07 08:38:02.936 *** View log from node mongooseim@localhost when finished mongooseim@localhost_4504.html



=== Ended at 2022-03-07 08:38:02
=== successfully completed test case
=== === Returned value: ok