=== Test case: service_domain_db_SUITE:rest_cannot_enable_domain_if_auth_provided_but_not_configured/1 (click for source code)

=== Config value:

    [{watchdog,<0.20201.2>},
     {service,true},
     {mim_conf1,#{core_opts =>
                      [[{<<"localhost">>,<<"localhost">>},
                        {<<"anonymous.localhost">>,<<"anonymous.localhost">>},
                        {<<"localhost.bis">>,<<"localhost.bis">>}],
                       [<<"test type">>,<<"dummy auth">>,<<"anonymous">>]],
                  loaded => true,service_opts => []}},
     {mim_conf2,#{core_opts =>
                      [[{<<"localhost">>,<<"localhost">>},
                        {<<"anonymous.localhost">>,<<"anonymous.localhost">>},
                        {<<"localhost.bis">>,<<"localhost.bis">>}],
                       [<<"test type">>,<<"dummy auth">>]],
                  loaded => true,service_opts => []}},
     {mim_conf3,#{core_opts =>
                      [[{<<"localhost">>,<<"localhost">>},
                        {<<"anonymous.localhost">>,<<"anonymous.localhost">>},
                        {<<"localhost.bis">>,<<"localhost.bis">>}],
                       []],
                  loaded => true,service_opts => []}},
     {service_setup,per_group},
     {{ejabberd_cwd,mongooseim@localhost},
      "/home/circleci/project/_build/mim1/rel/mongooseim"},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/service_domain_db_SUITE_data"},
     {preset,"odbc_mssql_mnesia"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@ebe8a8f9fc53.2022-01-25_16.21.59/big_tests.tests.service_domain_db_SUITE.logs/run.2022-01-25_16.36.30/service_domain_db_suite.rest_cannot_enable_domain_if_auth_provided_but_not_configured.166274.html"},
     {tc_group_properties,[{name,rest_without_auth_parallel},parallel]},
     {tc_group_path,[[{name,rest_without_auth}],[{name,db}]]},
     {data_dir,"/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/service_domain_db_SUITE_data/"},
     {priv_dir,"/home/circleci/project/big_tests/ct_report/ct_run.test@ebe8a8f9fc53.2022-01-25_16.21.59/big_tests.tests.service_domain_db_SUITE.logs/run.2022-01-25_16.36.30/log_private/"},
     {{saved_modules,mongooseim@localhost,<<"dummy auth">>},#{}}]

=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@ebe8a8f9fc53.2022-01-25_16.21.59"

=== Started at 2022-01-25 16:36:49


*** CT 2022-01-25 16:36:49.216 *** View log from node mongooseim@localhost when started mongooseim@localhost_6398.html
*** CT 2022-01-25 16:36:49.216 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_2432.html

*** User 2022-01-25 16:36:49.223 ***
REST request fails:
Code: 403
Req: {<0.20257.2>,<<"/api/domains/example.db">>,<<"PATCH">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"67344ab890ba1895">>},
       {<<"authorization">>,<<"Basic YWRtaW46c2VjcmV0">>}],
      <<"{\"enabled\":false}">>}
Result: {{<<"403">>,<<"Forbidden">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 25 Jan 2022 16:36:48 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"50">>}],
         <<"{\"what\":\"basic auth provided, but not configured\"}">>,181,627}
Params: #{body => <<"{\"enabled\":false}">>,
          creds => {<<"admin">>,<<"secret">>},
          method => <<"PATCH">>,path => <<"/api/domains/example.db">>,
          port => 8866,return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}

*** CT 2022-01-25 16:36:49.237 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_2432.html
*** CT 2022-01-25 16:36:49.237 *** View log from node mongooseim@localhost when finished mongooseim@localhost_6398.html



=== Ended at 2022-01-25 16:36:49
=== successfully completed test case
=== === Returned value: {{<<"403">>,<<"Forbidden">>},
                     {[{<<"what">>,
                        <<"basic auth provided, but not configured">>}]}}