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

=== Config value:

    [{watchdog,<0.65109.0>},
     {preset,"mysql_redis"},
     {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@eebaa68b7995.2024-01-14_19.39.51/big_tests.tests.muc_http_api_SUITE.logs/run.2024-01-14_19.49.38/muc_http_api_suite.message_errors.111108.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@eebaa68b7995.2024-01-14_19.39.51/big_tests.tests.muc_http_api_SUITE.logs/run.2024-01-14_19.49.38/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@eebaa68b7995.2024-01-14_19.39.51"

=== Started at 2024-01-14 19:49:43


*** CT 2024-01-14 19:49:43.280 *** View log from node mongooseim@localhost when started🔗 mongooseim@localhost_2240.html

*** User 2024-01-14 19:49:43.288 ***🔗
REST request:
Code: 201
Req: {<0.65150.0>,<<"/api/mucs/domain.example.com">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"6da0fb8a4c4c5041">>}],
      <<"{\"nick\":\"ali\",\"owner\":\"alicE_message_errors_2498@domain.example.com\",\"name\":\"wonderland-83.281323\"}">>}
Result: {{<<"201">>,<<"Created">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"location">>,
           <<"http://localhost:8088/api/mucs/domain.example.com/wonderland-83.281323">>},
          {<<"date">>,<<"Sun, 14 Jan 2024 19:49:43 GMT">>},
          {<<"content-type">>,<<"text/html">>},
          {<<"content-length">>,<<"20">>}],
         <<"wonderland-83.281323">>,224,2453}
Params: #{path => <<"/api/mucs/domain.example.com">>,
          server => #{node => mongooseim@localhost},
          body =>
              <<"{\"nick\":\"ali\",\"owner\":\"alicE_message_errors_2498@domain.example.com\",\"name\":\"wonderland-83.281323\"}">>,
          method => <<"POST">>,role => admin,return_headers => true}


*** User 2024-01-14 19:49:43.290 ***🔗
REST request:
Code: 204
Req: {<0.65162.0>,
      <<"/api/mucs/domain.example.com/thisroomdoesnotexist/messages">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"8f0579da4c73a476">>}],
      <<"{\"from\":\"alicE_message_errors_2498@domain.example.com\",\"body\":\"Greetings!\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Sun, 14 Jan 2024 19:49:43 GMT">>}],
         <<>>,80,1082}
Params: #{path =>
              <<"/api/mucs/domain.example.com/thisroomdoesnotexist/messages">>,
          server => #{node => mongooseim@localhost},
          body =>
              <<"{\"from\":\"alicE_message_errors_2498@domain.example.com\",\"body\":\"Greetings!\"}">>,
          method => <<"POST">>,role => admin,return_headers => true}


*** User 2024-01-14 19:49:43.291 ***🔗
REST request fails:
Code: 400
Req: {<0.65173.0>,
      <<"/api/mucs/domain.example.com/wonderland-83.281323/messages">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"c1da2dd7f966df5b">>}],
      <<"{\"from\":\"alicE_message_errors_2498@domain.example.com\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Sun, 14 Jan 2024 19:49:43 GMT">>},
          {<<"content-type">>,<<"text/html">>},
          {<<"content-length">>,<<"22">>}],
         <<"\"Missing message body\"">>,148,418}
Params: #{path =>
              <<"/api/mucs/domain.example.com/wonderland-83.281323/messages">>,
          server => #{node => mongooseim@localhost},
          body =>
              <<"{\"from\":\"alicE_message_errors_2498@domain.example.com\"}">>,
          method => <<"POST">>,role => admin,return_headers => true}


*** User 2024-01-14 19:49:43.292 ***🔗
REST request fails:
Code: 400
Req: {<0.65179.0>,
      <<"/api/mucs/domain.example.com/wonderland-83.281323/messages">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"f6b6524640195e7f">>}],
      <<"{\"body\":\"Greetings!\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Sun, 14 Jan 2024 19:49:43 GMT">>},
          {<<"content-type">>,<<"text/html">>},
          {<<"content-length">>,<<"20">>}],
         <<"\"Missing sender JID\"">>,146,516}
Params: #{path =>
              <<"/api/mucs/domain.example.com/wonderland-83.281323/messages">>,
          server => #{node => mongooseim@localhost},
          body => <<"{\"body\":\"Greetings!\"}">>,method => <<"POST">>,
          role => admin,return_headers => true}


*** User 2024-01-14 19:49:43.294 ***🔗
REST request fails:
Code: 400
Req: {<0.65183.0>,
      <<"/api/mucs/domain.example.com/wonderland-83.281323/messages">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"028e59ec181226f6">>}],
      <<"{\"from\":\"@invalid\",\"body\":\"Greetings!\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Sun, 14 Jan 2024 19:49:43 GMT">>},
          {<<"content-type">>,<<"text/html">>},
          {<<"content-length">>,<<"20">>}],
         <<"\"Invalid sender JID\"">>,146,459}
Params: #{path =>
              <<"/api/mucs/domain.example.com/wonderland-83.281323/messages">>,
          server => #{node => mongooseim@localhost},
          body => <<"{\"from\":\"@invalid\",\"body\":\"Greetings!\"}">>,
          method => <<"POST">>,role => admin,return_headers => true}

*** CT 2024-01-14 19:49:43.297 *** View log from node mongooseim@localhost when finished🔗 mongooseim@localhost_2240.html



=== Ended at 2024-01-14 19:49:43
=== successfully completed test case
=== === Returned value: {{<<"400">>,<<"Bad Request">>},<<"Invalid sender JID">>}