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

=== Config value:

    [{watchdog,<0.67018.0>},
     {preset,"odbc_mssql_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@c558b6ad2bd8.2024-02-26_15.40.27/big_tests.tests.muc_http_api_SUITE.logs/run.2024-02-26_15.54.10/muc_http_api_suite.message_errors.91780.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@c558b6ad2bd8.2024-02-26_15.40.27/big_tests.tests.muc_http_api_SUITE.logs/run.2024-02-26_15.54.10/log_private/"},
     {escalus_users,[{alice,[{username,<<"alicE">>},
                             {server,<<"domain.example.com">>},
                             {host,<<"localhost">>},
                             {password,<<"matygrysa">>}]},
                     {bob,[{username,<<"bOb">>},
                           {server,<<"domain.example.com">>},
                           {host,<<"localhost">>},
                           {password,<<"makrolika">>}]},
                     {kate,[{username,<<"kate">>},
                            {server,<<"domain.example.com">>},
                            {host,<<"localhost">>},
                            {password,<<"makrowe;p">>}]}]}]

=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@c558b6ad2bd8.2024-02-26_15.40.27"

=== Started at 2024-02-26 15:54:15


*** CT 2024-02-26 15:54:15.388 *** View log from node mongooseim@localhost when started🔗 mongooseim@localhost_2453.html

*** User 2024-02-26 15:54:15.399 ***🔗
REST request:
Code: 201
Req: {<0.67057.0>,<<"/api/mucs/domain.example.com">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"423cae73b3cb282d">>}],
      <<"{\"nick\":\"ali\",\"owner\":\"alicE_message_errors_2779@domain.example.com\",\"name\":\"wonderland-55.389038\"}">>}
Result: {{<<"201">>,<<"Created">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"location">>,
           <<"http://localhost:8088/api/mucs/domain.example.com/wonderland-55.389038">>},
          {<<"date">>,<<"Mon, 26 Feb 2024 15:54:14 GMT">>},
          {<<"content-type">>,<<"text/html">>},
          {<<"content-length">>,<<"20">>}],
         <<"wonderland-55.389038">>,224,2677}
Params: #{path => <<"/api/mucs/domain.example.com">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,
          body =>
              <<"{\"nick\":\"ali\",\"owner\":\"alicE_message_errors_2779@domain.example.com\",\"name\":\"wonderland-55.389038\"}">>,
          role => admin,return_headers => true}


*** User 2024-02-26 15:54:15.401 ***🔗
REST request:
Code: 204
Req: {<0.67065.0>,
      <<"/api/mucs/domain.example.com/thisroomdoesnotexist/messages">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"4e02514ffc38bb02">>}],
      <<"{\"body\":\"Greetings!\",\"from\":\"alicE_message_errors_2779@domain.example.com\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 26 Feb 2024 15:54:14 GMT">>}],
         <<>>,80,1164}
Params: #{path =>
              <<"/api/mucs/domain.example.com/thisroomdoesnotexist/messages">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,
          body =>
              <<"{\"body\":\"Greetings!\",\"from\":\"alicE_message_errors_2779@domain.example.com\"}">>,
          role => admin,return_headers => true}


*** User 2024-02-26 15:54:15.403 ***🔗
REST request fails:
Code: 400
Req: {<0.67073.0>,
      <<"/api/mucs/domain.example.com/wonderland-55.389038/messages">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"223bfbb8b5b3413f">>}],
      <<"{\"from\":\"alicE_message_errors_2779@domain.example.com\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 26 Feb 2024 15:54:14 GMT">>},
          {<<"content-type">>,<<"text/html">>},
          {<<"content-length">>,<<"22">>}],
         <<"\"Missing message body\"">>,148,588}
Params: #{path =>
              <<"/api/mucs/domain.example.com/wonderland-55.389038/messages">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,
          body =>
              <<"{\"from\":\"alicE_message_errors_2779@domain.example.com\"}">>,
          role => admin,return_headers => true}


*** User 2024-02-26 15:54:15.404 ***🔗
REST request fails:
Code: 400
Req: {<0.67079.0>,
      <<"/api/mucs/domain.example.com/wonderland-55.389038/messages">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"1463aa8e33d4d8ea">>}],
      <<"{\"body\":\"Greetings!\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 26 Feb 2024 15:54:14 GMT">>},
          {<<"content-type">>,<<"text/html">>},
          {<<"content-length">>,<<"20">>}],
         <<"\"Missing sender JID\"">>,146,644}
Params: #{path =>
              <<"/api/mucs/domain.example.com/wonderland-55.389038/messages">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,body => <<"{\"body\":\"Greetings!\"}">>,
          role => admin,return_headers => true}


*** User 2024-02-26 15:54:15.406 ***🔗
REST request fails:
Code: 400
Req: {<0.67088.0>,
      <<"/api/mucs/domain.example.com/wonderland-55.389038/messages">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"2f135ed91cfe8a63">>}],
      <<"{\"body\":\"Greetings!\",\"from\":\"@invalid\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 26 Feb 2024 15:54:14 GMT">>},
          {<<"content-type">>,<<"text/html">>},
          {<<"content-length">>,<<"20">>}],
         <<"\"Invalid sender JID\"">>,146,610}
Params: #{path =>
              <<"/api/mucs/domain.example.com/wonderland-55.389038/messages">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,
          body => <<"{\"body\":\"Greetings!\",\"from\":\"@invalid\"}">>,
          role => admin,return_headers => true}

*** CT 2024-02-26 15:54:15.409 *** View log from node mongooseim@localhost when finished🔗 mongooseim@localhost_2453.html



=== Ended at 2024-02-26 15:54:15
=== successfully completed test case
=== === Returned value: {{<<"400">>,<<"Bad Request">>},<<"Invalid sender JID">>}