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

=== Config value:

    [{watchdog,<0.2927.2>},
     {preset,"pgsql_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@0305a9e9395e.2024-04-16_11.58.27/big_tests.tests.muc_http_api_SUITE.logs/run.2024-04-16_12.10.00/muc_http_api_suite.message_errors.106372.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@0305a9e9395e.2024-04-16_11.58.27/big_tests.tests.muc_http_api_SUITE.logs/run.2024-04-16_12.10.00/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@0305a9e9395e.2024-04-16_11.58.27"

=== Started at 2024-04-16 12:10:05


*** CT 2024-04-16 12:10:05.938 *** View log from node mongooseim@localhost when started🔗 mongooseim@localhost_2460.html

*** User 2024-04-16 12:10:05.950 ***🔗
REST request:
Code: 201
Req: {<0.2966.2>,<<"/api/mucs/domain.example.com">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"e47607f65a2b4afb">>}],
      <<"{\"owner\":\"alicE_message_errors_2810@domain.example.com\",\"nick\":\"ali\",\"name\":\"wonderland-5.939715\"}">>}
Result: {{<<"201">>,<<"Created">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"location">>,
           <<"http://localhost:8088/api/mucs/domain.example.com/wonderland-5.939715">>},
          {<<"date">>,<<"Tue, 16 Apr 2024 12:10:05 GMT">>},
          {<<"content-type">>,<<"text/html">>},
          {<<"content-length">>,<<"19">>}],
         <<"wonderland-5.939715">>,222,3143}
Params: #{body =>
              <<"{\"owner\":\"alicE_message_errors_2810@domain.example.com\",\"nick\":\"ali\",\"name\":\"wonderland-5.939715\"}">>,
          method => <<"POST">>,path => <<"/api/mucs/domain.example.com">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2024-04-16 12:10:05.952 ***🔗
REST request:
Code: 204
Req: {<0.2978.2>,
      <<"/api/mucs/domain.example.com/thisroomdoesnotexist/messages">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"937327f985d64d7f">>}],
      <<"{\"from\":\"alicE_message_errors_2810@domain.example.com\",\"body\":\"Greetings!\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 16 Apr 2024 12:10:05 GMT">>}],
         <<>>,80,941}
Params: #{body =>
              <<"{\"from\":\"alicE_message_errors_2810@domain.example.com\",\"body\":\"Greetings!\"}">>,
          method => <<"POST">>,
          path =>
              <<"/api/mucs/domain.example.com/thisroomdoesnotexist/messages">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2024-04-16 12:10:05.956 ***🔗
REST request fails:
Code: 400
Req: {<0.2982.2>,
      <<"/api/mucs/domain.example.com/wonderland-5.939715/messages">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"e5f174a9fc9687eb">>}],
      <<"{\"from\":\"alicE_message_errors_2810@domain.example.com\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 16 Apr 2024 12:10:05 GMT">>},
          {<<"content-type">>,<<"text/html">>},
          {<<"content-length">>,<<"22">>}],
         <<"\"Missing message body\"">>,148,1554}
Params: #{body =>
              <<"{\"from\":\"alicE_message_errors_2810@domain.example.com\"}">>,
          method => <<"POST">>,
          path =>
              <<"/api/mucs/domain.example.com/wonderland-5.939715/messages">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2024-04-16 12:10:05.958 ***🔗
REST request fails:
Code: 400
Req: {<0.2990.2>,
      <<"/api/mucs/domain.example.com/wonderland-5.939715/messages">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"d52d3a787096940d">>}],
      <<"{\"body\":\"Greetings!\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 16 Apr 2024 12:10:05 GMT">>},
          {<<"content-type">>,<<"text/html">>},
          {<<"content-length">>,<<"20">>}],
         <<"\"Missing sender JID\"">>,146,745}
Params: #{body => <<"{\"body\":\"Greetings!\"}">>,method => <<"POST">>,
          path =>
              <<"/api/mucs/domain.example.com/wonderland-5.939715/messages">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2024-04-16 12:10:05.961 ***🔗
REST request fails:
Code: 400
Req: {<0.2997.2>,
      <<"/api/mucs/domain.example.com/wonderland-5.939715/messages">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"4e43ccdd681a4f37">>}],
      <<"{\"from\":\"@invalid\",\"body\":\"Greetings!\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 16 Apr 2024 12:10:05 GMT">>},
          {<<"content-type">>,<<"text/html">>},
          {<<"content-length">>,<<"20">>}],
         <<"\"Invalid sender JID\"">>,146,911}
Params: #{body => <<"{\"from\":\"@invalid\",\"body\":\"Greetings!\"}">>,
          method => <<"POST">>,
          path =>
              <<"/api/mucs/domain.example.com/wonderland-5.939715/messages">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}

*** CT 2024-04-16 12:10:05.966 *** View log from node mongooseim@localhost when finished🔗 mongooseim@localhost_2460.html



=== Ended at 2024-04-16 12:10:05
=== successfully completed test case
=== === Returned value: {{<<"400">>,<<"Bad Request">>},<<"Invalid sender JID">>}