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

=== Config value:

    [{watchdog,<0.66999.0>},
     {preset,"pgsql_cets"},
     {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@30ac10815d6f.2024-04-09_11.35.49/big_tests.tests.muc_http_api_SUITE.logs/run.2024-04-09_11.46.59/muc_http_api_suite.message_errors.87300.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@30ac10815d6f.2024-04-09_11.35.49/big_tests.tests.muc_http_api_SUITE.logs/run.2024-04-09_11.46.59/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@30ac10815d6f.2024-04-09_11.35.49"

=== Started at 2024-04-09 11:47:05


*** CT 2024-04-09 11:47:05.034 *** View log from node mongooseim@localhost when started🔗 mongooseim@localhost_4284.html

*** User 2024-04-09 11:47:05.041 ***🔗
REST request:
Code: 201
Req: {<0.67040.0>,<<"/api/mucs/localhost">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"4388112a09b28c91">>}],
      <<"{\"nick\":\"ali\",\"owner\":\"alicE_message_errors_2542@localhost\",\"name\":\"wonderland-25.35159\"}">>}
Result: {{<<"201">>,<<"Created">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"location">>,
           <<"http://localhost:8088/api/mucs/localhost/wonderland-25.35159">>},
          {<<"date">>,<<"Tue, 09 Apr 2024 11:47:04 GMT">>},
          {<<"content-type">>,<<"text/html">>},
          {<<"content-length">>,<<"19">>}],
         <<"wonderland-25.35159">>,213,1647}
Params: #{path => <<"/api/mucs/localhost">>,
          server => #{node => mongooseim@localhost},
          body =>
              <<"{\"nick\":\"ali\",\"owner\":\"alicE_message_errors_2542@localhost\",\"name\":\"wonderland-25.35159\"}">>,
          role => admin,method => <<"POST">>,return_headers => true}


*** User 2024-04-09 11:47:05.043 ***🔗
REST request:
Code: 204
Req: {<0.67050.0>,<<"/api/mucs/localhost/thisroomdoesnotexist/messages">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"5a328838f208e93f">>}],
      <<"{\"from\":\"alicE_message_errors_2542@localhost\",\"body\":\"Greetings!\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 09 Apr 2024 11:47:04 GMT">>}],
         <<>>,80,667}
Params: #{path => <<"/api/mucs/localhost/thisroomdoesnotexist/messages">>,
          server => #{node => mongooseim@localhost},
          body =>
              <<"{\"from\":\"alicE_message_errors_2542@localhost\",\"body\":\"Greetings!\"}">>,
          role => admin,method => <<"POST">>,return_headers => true}


*** User 2024-04-09 11:47:05.045 ***🔗
REST request fails:
Code: 400
Req: {<0.67059.0>,<<"/api/mucs/localhost/wonderland-25.35159/messages">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"9935c7e03722e74b">>}],
      <<"{\"from\":\"alicE_message_errors_2542@localhost\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 09 Apr 2024 11:47:04 GMT">>},
          {<<"content-type">>,<<"text/html">>},
          {<<"content-length">>,<<"22">>}],
         <<"\"Missing message body\"">>,148,491}
Params: #{path => <<"/api/mucs/localhost/wonderland-25.35159/messages">>,
          server => #{node => mongooseim@localhost},
          body => <<"{\"from\":\"alicE_message_errors_2542@localhost\"}">>,
          role => admin,method => <<"POST">>,return_headers => true}


*** User 2024-04-09 11:47:05.046 ***🔗
REST request fails:
Code: 400
Req: {<0.67065.0>,<<"/api/mucs/localhost/wonderland-25.35159/messages">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"62bd8a237355056c">>}],
      <<"{\"body\":\"Greetings!\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 09 Apr 2024 11:47:04 GMT">>},
          {<<"content-type">>,<<"text/html">>},
          {<<"content-length">>,<<"20">>}],
         <<"\"Missing sender JID\"">>,146,417}
Params: #{path => <<"/api/mucs/localhost/wonderland-25.35159/messages">>,
          server => #{node => mongooseim@localhost},
          body => <<"{\"body\":\"Greetings!\"}">>,role => admin,
          method => <<"POST">>,return_headers => true}


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

*** CT 2024-04-09 11:47:05.053 *** View log from node mongooseim@localhost when finished🔗 mongooseim@localhost_4284.html



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