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

=== Config value:

    [{watchdog,<0.73253.0>},
     {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@ba61420e19a8.2024-03-11_11.24.31/big_tests.tests.muc_http_api_SUITE.logs/run.2024-03-11_11.37.22/muc_http_api_suite.message_errors.117764.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@ba61420e19a8.2024-03-11_11.24.31/big_tests.tests.muc_http_api_SUITE.logs/run.2024-03-11_11.37.22/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@ba61420e19a8.2024-03-11_11.24.31"

=== Started at 2024-03-11 11:37:27


*** CT 2024-03-11 11:37:27.582 *** View log from node mongooseim@localhost when started🔗 mongooseim@localhost_4606.html

*** User 2024-03-11 11:37:27.591 ***🔗
REST request:
Code: 201
Req: {<0.73294.0>,<<"/api/mucs/localhost">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"a74a098f00f1f5fd">>}],
      <<"{\"nick\":\"ali\",\"owner\":\"alicE_message_errors_2881@localhost\",\"name\":\"wonderland-47.583240\"}">>}
Result: {{<<"201">>,<<"Created">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"location">>,
           <<"http://localhost:8088/api/mucs/localhost/wonderland-47.583240">>},
          {<<"date">>,<<"Mon, 11 Mar 2024 11:37:26 GMT">>},
          {<<"content-type">>,<<"text/html">>},
          {<<"content-length">>,<<"20">>}],
         <<"wonderland-47.583240">>,215,1940}
Params: #{path => <<"/api/mucs/localhost">>,
          server => #{node => mongooseim@localhost},
          body =>
              <<"{\"nick\":\"ali\",\"owner\":\"alicE_message_errors_2881@localhost\",\"name\":\"wonderland-47.583240\"}">>,
          method => <<"POST">>,role => admin,return_headers => true}


*** User 2024-03-11 11:37:27.593 ***🔗
REST request:
Code: 204
Req: {<0.73304.0>,<<"/api/mucs/localhost/thisroomdoesnotexist/messages">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"3aac27041e3ed791">>}],
      <<"{\"from\":\"alicE_message_errors_2881@localhost\",\"body\":\"Greetings!\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 11 Mar 2024 11:37:26 GMT">>}],
         <<>>,80,829}
Params: #{path => <<"/api/mucs/localhost/thisroomdoesnotexist/messages">>,
          server => #{node => mongooseim@localhost},
          body =>
              <<"{\"from\":\"alicE_message_errors_2881@localhost\",\"body\":\"Greetings!\"}">>,
          method => <<"POST">>,role => admin,return_headers => true}


*** User 2024-03-11 11:37:27.594 ***🔗
REST request fails:
Code: 400
Req: {<0.73313.0>,<<"/api/mucs/localhost/wonderland-47.583240/messages">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"819cd26741fbd552">>}],
      <<"{\"from\":\"alicE_message_errors_2881@localhost\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 11 Mar 2024 11:37:26 GMT">>},
          {<<"content-type">>,<<"text/html">>},
          {<<"content-length">>,<<"22">>}],
         <<"\"Missing message body\"">>,148,450}
Params: #{path => <<"/api/mucs/localhost/wonderland-47.583240/messages">>,
          server => #{node => mongooseim@localhost},
          body => <<"{\"from\":\"alicE_message_errors_2881@localhost\"}">>,
          method => <<"POST">>,role => admin,return_headers => true}


*** User 2024-03-11 11:37:27.596 ***🔗
REST request fails:
Code: 400
Req: {<0.73319.0>,<<"/api/mucs/localhost/wonderland-47.583240/messages">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"f81cd404d41c71e1">>}],
      <<"{\"body\":\"Greetings!\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 11 Mar 2024 11:37:26 GMT">>},
          {<<"content-type">>,<<"text/html">>},
          {<<"content-length">>,<<"20">>}],
         <<"\"Missing sender JID\"">>,146,637}
Params: #{path => <<"/api/mucs/localhost/wonderland-47.583240/messages">>,
          server => #{node => mongooseim@localhost},
          body => <<"{\"body\":\"Greetings!\"}">>,method => <<"POST">>,
          role => admin,return_headers => true}


*** User 2024-03-11 11:37:27.597 ***🔗
REST request fails:
Code: 400
Req: {<0.73325.0>,<<"/api/mucs/localhost/wonderland-47.583240/messages">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"e5dfc36e010550f2">>}],
      <<"{\"from\":\"@invalid\",\"body\":\"Greetings!\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 11 Mar 2024 11:37:26 GMT">>},
          {<<"content-type">>,<<"text/html">>},
          {<<"content-length">>,<<"20">>}],
         <<"\"Invalid sender JID\"">>,146,436}
Params: #{path => <<"/api/mucs/localhost/wonderland-47.583240/messages">>,
          server => #{node => mongooseim@localhost},
          body => <<"{\"from\":\"@invalid\",\"body\":\"Greetings!\"}">>,
          method => <<"POST">>,role => admin,return_headers => true}

*** CT 2024-03-11 11:37:27.601 *** View log from node mongooseim@localhost when finished🔗 mongooseim@localhost_4606.html



=== Ended at 2024-03-11 11:37:27
=== successfully completed test case
=== === Returned value: {{<<"400">>,<<"Bad Request">>},<<"Invalid sender JID">>}