=== Test case: muc_light_http_api_SUITE:send_message_errors/1 (click for source code)

=== Config value:

    [{watchdog,<0.70451.0>},
     {preset,"pgsql_mnesia"},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/muc_light_http_api_SUITE_data"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@e0764d5c58c7.2024-04-23_08.56.38/big_tests.tests.muc_light_http_api_SUITE.logs/run.2024-04-23_09.08.13/muc_light_http_api_suite.send_message_errors.198274.html"},
     {tc_group_properties,[{name,negative},parallel]},
     {tc_group_path,[]},
     {data_dir,"/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/muc_light_http_api_SUITE_data/"},
     {priv_dir,"/home/circleci/project/big_tests/ct_report/ct_run.test@e0764d5c58c7.2024-04-23_08.56.38/big_tests.tests.muc_light_http_api_SUITE.logs/run.2024-04-23_09.08.13/log_private/"},
     {{saved_modules,mongooseim@localhost,<<"test type">>},
      #{mod_vcard =>
            #{matches => 30,
              host => {prefix,<<"vjud.">>},
              search => true,iqdisc => parallel,backend => rdbms},
        mod_roster =>
            #{iqdisc => one_queue,backend => rdbms,versioning => false,
              store_current_id => false},
        mod_register =>
            #{access => register,iqdisc => one_queue,
              registration_watchers => [],password_strength => 0,
              ip_access => [{allow,"127.0.0.0/8"},{deny,"0.0.0.0/0"}]},
        mod_sic => #{iqdisc => one_queue},
        mod_amp => #{},mod_presence => #{},
        mod_disco =>
            #{server_info => [],iqdisc => one_queue,extra_domains => [],
              users_can_see_hidden_services => false},
        mod_stream_management =>
            #{buffer => true,ack => true,backend => mnesia,buffer_max => 100,
              ack_freq => 1,
              stale_h =>
                  #{enabled => false,repeat_after => 1800,geriatric => 3600},
              resume_timeout => 600},
        mod_adhoc => #{iqdisc => one_queue,report_commands_node => false},
        mod_bosh =>
            #{backend => mnesia,inactivity => 30,max_pause => 120,
              max_wait => infinity,server_acks => false},
        mod_cache_users =>
            #{strategy => fifo,number_of_segments => 5,time_to_live => 2},
        mod_carboncopy => #{iqdisc => no_queue}}},
     {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@e0764d5c58c7.2024-04-23_08.56.38"

=== Started at 2024-04-23 09:08:13


*** CT 2024-04-23 09:08:13.967 *** View log from node mongooseim@localhost when started🔗 mongooseim@localhost_2492.html

*** User 2024-04-23 09:08:13.981 ***🔗
REST request:
Code: 204
Req: {<0.70514.0>,
      <<"/api/muc-lights/muclight.domain.example.com/alice_send_message_errors_2828-room/messages">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"fe80d9d060797f52">>}],
      <<"{\"body\":\"hello\",\"from\":\"alicE_send_message_errors_2828@domain.example.com\"}">>}
Result: {{<<"204">>,<<"No Content">>},[],<<>>,27,1669}
Params: #{path =>
              <<"/api/muc-lights/muclight.domain.example.com/alice_send_message_errors_2828-room/messages">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,role => admin,
          body =>
              <<"{\"body\":\"hello\",\"from\":\"alicE_send_message_errors_2828@domain.example.com\"}">>,
          return_headers => true}


*** User 2024-04-23 09:08:13.983 ***🔗
REST request fails:
Code: 400
Req: {<0.70526.0>,
      <<"/api/muc-lights/muclight.domain.example.com/alice_send_message_errors_2828-room/messages">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"ac441dfc02f9a1cc">>}],
      <<"{\"from\":\"alicE_send_message_errors_2828@domain.example.com\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 23 Apr 2024 09:08:13 GMT">>},
          {<<"content-type">>,<<"text/html">>},
          {<<"content-length">>,<<"22">>}],
         <<"\"Missing message body\"">>,148,552}
Params: #{path =>
              <<"/api/muc-lights/muclight.domain.example.com/alice_send_message_errors_2828-room/messages">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,role => admin,
          body =>
              <<"{\"from\":\"alicE_send_message_errors_2828@domain.example.com\"}">>,
          return_headers => true}


*** User 2024-04-23 09:08:13.984 ***🔗
REST request fails:
Code: 400
Req: {<0.70536.0>,
      <<"/api/muc-lights/muclight.domain.example.com/alice_send_message_errors_2828-room/messages">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"cfdced4a593bbb79">>}],
      <<"{\"body\":\"hello\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 23 Apr 2024 09:08:13 GMT">>},
          {<<"content-type">>,<<"text/html">>},
          {<<"content-length">>,<<"20">>}],
         <<"\"Missing sender JID\"">>,146,516}
Params: #{path =>
              <<"/api/muc-lights/muclight.domain.example.com/alice_send_message_errors_2828-room/messages">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,role => admin,
          body => <<"{\"body\":\"hello\"}">>,return_headers => true}


*** User 2024-04-23 09:08:13.985 ***🔗
REST request fails:
Code: 400
Req: {<0.70542.0>,
      <<"/api/muc-lights/muclight.domain.example.com/alice_send_message_errors_2828-room/messages">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"2be801a2a64b9b7d">>}],
      <<"{\"body\":\"hello\",\"from\":\"@invalid\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 23 Apr 2024 09:08:13 GMT">>},
          {<<"content-type">>,<<"text/html">>},
          {<<"content-length">>,<<"20">>}],
         <<"\"Invalid sender JID\"">>,146,394}
Params: #{path =>
              <<"/api/muc-lights/muclight.domain.example.com/alice_send_message_errors_2828-room/messages">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,role => admin,
          body => <<"{\"body\":\"hello\",\"from\":\"@invalid\"}">>,
          return_headers => true}


*** User 2024-04-23 09:08:13.987 ***🔗
REST request fails:
Code: 400
Req: {<0.70550.0>,
      <<"/api/muc-lights/muclight.domain.example.com/alice_send_message_errors_2828-room/messages">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"78c889530f978eea">>}],
      <<"{\"body\":\"hello\",\"from\":\"baduser@domain.example.com\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 23 Apr 2024 09:08:13 GMT">>},
          {<<"content-type">>,<<"text/html">>},
          {<<"content-length">>,<<"27">>}],
         <<"\"Given user does not exist\"">>,153,732}
Params: #{path =>
              <<"/api/muc-lights/muclight.domain.example.com/alice_send_message_errors_2828-room/messages">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,role => admin,
          body =>
              <<"{\"body\":\"hello\",\"from\":\"baduser@domain.example.com\"}">>,
          return_headers => true}


*** User 2024-04-23 09:08:13.989 ***🔗
REST request fails:
Code: 403
Req: {<0.70561.0>,
      <<"/api/muc-lights/muclight.domain.example.com/alice_send_message_errors_2828-room/messages">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"fbb3170ff4fb8473">>}],
      <<"{\"body\":\"hello\",\"from\":\"bOb_send_message_errors_2828@domain.example.com\"}">>}
Result: {{<<"403">>,<<"Forbidden">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 23 Apr 2024 09:08:13 GMT">>},
          {<<"content-type">>,<<"text/html">>},
          {<<"content-length">>,<<"38">>}],
         <<"\"Given user does not occupy this room\"">>,162,1210}
Params: #{path =>
              <<"/api/muc-lights/muclight.domain.example.com/alice_send_message_errors_2828-room/messages">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,role => admin,
          body =>
              <<"{\"body\":\"hello\",\"from\":\"bOb_send_message_errors_2828@domain.example.com\"}">>,
          return_headers => true}


*** User 2024-04-23 09:08:13.990 ***🔗
REST request fails:
Code: 404
Req: {<0.70568.0>,
      <<"/api/muc-lights/muclight.domain.example.com/badroom/messages">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"671def491d13d04e">>}],
      <<"{\"body\":\"hello\",\"from\":\"alicE_send_message_errors_2828@domain.example.com\"}">>}
Result: {{<<"404">>,<<"Not Found">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 23 Apr 2024 09:08:13 GMT">>},
          {<<"content-type">>,<<"text/html">>},
          {<<"content-length">>,<<"16">>}],
         <<"\"Room not found\"">>,140,692}
Params: #{path =>
              <<"/api/muc-lights/muclight.domain.example.com/badroom/messages">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,role => admin,
          body =>
              <<"{\"body\":\"hello\",\"from\":\"alicE_send_message_errors_2828@domain.example.com\"}">>,
          return_headers => true}


*** User 2024-04-23 09:08:13.991 ***🔗
REST request fails:
Code: 404
Req: {<0.70572.0>,
      <<"/api/muc-lights/domain.example.com/alice_send_message_errors_2828-room/messages">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"fd62001e6138a9d0">>}],
      <<"{\"body\":\"hello\",\"from\":\"alicE_send_message_errors_2828@domain.example.com\"}">>}
Result: {{<<"404">>,<<"Not Found">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 23 Apr 2024 09:08:13 GMT">>},
          {<<"content-type">>,<<"text/html">>},
          {<<"content-length">>,<<"28">>}],
         <<"\"MUC Light server not found\"">>,152,517}
Params: #{path =>
              <<"/api/muc-lights/domain.example.com/alice_send_message_errors_2828-room/messages">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,role => admin,
          body =>
              <<"{\"body\":\"hello\",\"from\":\"alicE_send_message_errors_2828@domain.example.com\"}">>,
          return_headers => true}

*** CT 2024-04-23 09:08:13.994 *** View log from node mongooseim@localhost when finished🔗 mongooseim@localhost_2492.html



=== Ended at 2024-04-23 09:08:14
=== successfully completed test case
=== === Returned value: {{<<"404">>,<<"Not Found">>},
                     <<"MUC Light server not found">>}