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

=== Config value:

    [{watchdog,<0.42583.0>},
     {preset,"internal_mnesia"},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/muc_http_api_SUITE_data"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@8f270c211212.2024-04-22_14.32.33/big_tests.tests.muc_http_api_SUITE.logs/run.2024-04-22_14.45.04/muc_http_api_suite.message_errors.56963.html"},
     {tc_group_properties,[{name,negative},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@8f270c211212.2024-04-22_14.32.33/big_tests.tests.muc_http_api_SUITE.logs/run.2024-04-22_14.45.04/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@8f270c211212.2024-04-22_14.32.33"

=== Started at 2024-04-22 14:45:09


*** CT 2024-04-22 14:45:09.939 *** View log from node mongooseim@localhost when started🔗 mongooseim@localhost_4257.html

*** User 2024-04-22 14:45:09.947 ***🔗
REST request:
Code: 201
Req: {<0.42622.0>,<<"/api/mucs/localhost">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"3c408d67d03e316e">>}],
      <<"{\"nick\":\"ali\",\"owner\":\"alicE_message_errors_1477@localhost\",\"name\":\"wonderland-9.940114\"}">>}
Result: {{<<"201">>,<<"Created">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"location">>,
           <<"http://localhost:8088/api/mucs/localhost/wonderland-9.940114">>},
          {<<"date">>,<<"Mon, 22 Apr 2024 14:45:09 GMT">>},
          {<<"content-type">>,<<"text/html">>},
          {<<"content-length">>,<<"19">>}],
         <<"wonderland-9.940114">>,213,1536}
Params: #{path => <<"/api/mucs/localhost">>,
          server => #{node => mongooseim@localhost},
          role => admin,method => <<"POST">>,
          body =>
              <<"{\"nick\":\"ali\",\"owner\":\"alicE_message_errors_1477@localhost\",\"name\":\"wonderland-9.940114\"}">>,
          return_headers => true}


*** User 2024-04-22 14:45:09.949 ***🔗
REST request:
Code: 204
Req: {<0.42636.0>,<<"/api/mucs/localhost/thisroomdoesnotexist/messages">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"c6593994a2b823ee">>}],
      <<"{\"from\":\"alicE_message_errors_1477@localhost\",\"body\":\"Greetings!\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 22 Apr 2024 14:45:09 GMT">>}],
         <<>>,80,531}
Params: #{path => <<"/api/mucs/localhost/thisroomdoesnotexist/messages">>,
          server => #{node => mongooseim@localhost},
          role => admin,method => <<"POST">>,
          body =>
              <<"{\"from\":\"alicE_message_errors_1477@localhost\",\"body\":\"Greetings!\"}">>,
          return_headers => true}


*** User 2024-04-22 14:45:09.951 ***🔗
REST request fails:
Code: 400
Req: {<0.42640.0>,<<"/api/mucs/localhost/wonderland-9.940114/messages">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"c562371d8482a36e">>}],
      <<"{\"from\":\"alicE_message_errors_1477@localhost\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 22 Apr 2024 14:45:09 GMT">>},
          {<<"content-type">>,<<"text/html">>},
          {<<"content-length">>,<<"22">>}],
         <<"\"Missing message body\"">>,148,791}
Params: #{path => <<"/api/mucs/localhost/wonderland-9.940114/messages">>,
          server => #{node => mongooseim@localhost},
          role => admin,method => <<"POST">>,
          body => <<"{\"from\":\"alicE_message_errors_1477@localhost\"}">>,
          return_headers => true}


*** User 2024-04-22 14:45:09.953 ***🔗
REST request fails:
Code: 400
Req: {<0.42649.0>,<<"/api/mucs/localhost/wonderland-9.940114/messages">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"2f406ea64dd8875a">>}],
      <<"{\"body\":\"Greetings!\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 22 Apr 2024 14:45:09 GMT">>},
          {<<"content-type">>,<<"text/html">>},
          {<<"content-length">>,<<"20">>}],
         <<"\"Missing sender JID\"">>,146,525}
Params: #{path => <<"/api/mucs/localhost/wonderland-9.940114/messages">>,
          server => #{node => mongooseim@localhost},
          role => admin,method => <<"POST">>,
          body => <<"{\"body\":\"Greetings!\"}">>,return_headers => true}


*** User 2024-04-22 14:45:09.955 ***🔗
REST request fails:
Code: 400
Req: {<0.42653.0>,<<"/api/mucs/localhost/wonderland-9.940114/messages">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"b84e9adc820e59f5">>}],
      <<"{\"from\":\"@invalid\",\"body\":\"Greetings!\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 22 Apr 2024 14:45:09 GMT">>},
          {<<"content-type">>,<<"text/html">>},
          {<<"content-length">>,<<"20">>}],
         <<"\"Invalid sender JID\"">>,146,631}
Params: #{path => <<"/api/mucs/localhost/wonderland-9.940114/messages">>,
          server => #{node => mongooseim@localhost},
          role => admin,method => <<"POST">>,
          body => <<"{\"from\":\"@invalid\",\"body\":\"Greetings!\"}">>,
          return_headers => true}

*** CT 2024-04-22 14:45:09.957 *** View log from node mongooseim@localhost when finished🔗 mongooseim@localhost_4257.html



=== Ended at 2024-04-22 14:45:09
=== successfully completed test case
=== === Returned value: {{<<"400">>,<<"Bad Request">>},<<"Invalid sender JID">>}