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

=== Config value:

    [{watchdog,<0.65764.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@d081adacb998.2024-01-14_19.39.56/big_tests.tests.muc_http_api_SUITE.logs/run.2024-01-14_19.52.27/muc_http_api_suite.message_errors.201986.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@d081adacb998.2024-01-14_19.39.56/big_tests.tests.muc_http_api_SUITE.logs/run.2024-01-14_19.52.27/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@d081adacb998.2024-01-14_19.39.56"

=== Started at 2024-01-14 19:52:33


*** CT 2024-01-14 19:52:33.321 *** View log from node mongooseim@localhost when started🔗 mongooseim@localhost_2525.html

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


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


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


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


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

*** CT 2024-01-14 19:52:33.341 *** View log from node mongooseim@localhost when finished🔗 mongooseim@localhost_2525.html



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