=== Test case: graphql_stats_SUITE:domain_admin_stats_domain_no_permission_test/1 (click for source code)

=== Config value:

    [{protocol,http},
     {domain_admin,{<<"admin@localhost">>,<<"a7d59dffcec277b6">>}},
     {schema_endpoint,domain_admin},
     {watchdog,<0.29985.0>},
     {auth_mods,[ejabberd_auth_rdbms,ejabberd_auth_anonymous,
                 ejabberd_auth_rdbms]},
     {{ejabberd_cwd,mongooseim@localhost},
      "/home/circleci/project/_build/mim1/rel/mongooseim"},
     {preset,"odbc_mssql_mnesia"},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/graphql_stats_SUITE_data"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@263f7cbb53ed.2024-04-25_14.57.19/big_tests.tests.graphql_stats_SUITE.logs/run.2024-04-25_15.03.56/graphql_stats_suite.domain_admin_stats_domain_no_permission_test.html"},
     {tc_group_properties,[{name,domain_admin_stats}]},
     {tc_group_path,[]},
     {data_dir,"/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/graphql_stats_SUITE_data/"},
     {priv_dir,"/home/circleci/project/big_tests/ct_report/ct_run.test@263f7cbb53ed.2024-04-25_14.57.19/big_tests.tests.graphql_stats_SUITE.logs/run.2024-04-25_15.03.56/log_private/"}]

=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@263f7cbb53ed.2024-04-25_14.57.19"

=== Started at 2024-04-25 15:03:59


*** CT 2024-04-25 15:03:59.239 *** View log from node mongooseim@localhost when started🔗 mongooseim@localhost_1855.html

*** User 2024-04-25 15:03:59.250 ***🔗
REST request fails:
Code: 401
Req: {<0.30034.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"c8442d3443a59416">>},
       {<<"authorization">>,
        <<"Basic YWRtaW5AbG9jYWxob3N0OmE3ZDU5ZGZmY2VjMjc3YjY=">>}],
      <<"{\"variables\":{\"domain\":\"localhost.bis\"},\"query\":\"query ($domain: DomainName!) { stat { domainStats(domain: $domain) { onlineUsers registeredUsers } } }\"}">>}
Result: {{<<"401">>,<<"Unauthorized">>},
         [{<<"vary">>,<<"accept">>},
          {<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 25 Apr 2024 15:03:59 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"201">>}],
         <<"{\"errors\":[{\"extensions\":{\"code\":\"no_permissions\"},\"path\":[\"ROOT\",\"stat\",\"domainStats\"],\"message\":\"Cannot execute query ROOT without permissions to the given domain. Args with invalid value: domain\"}]}">>,
         350,8945}
Params: #{port => 5541,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          body =>
              <<"{\"variables\":{\"domain\":\"localhost.bis\"},\"query\":\"query ($domain: DomainName!) { stat { domainStats(domain: $domain) { onlineUsers registeredUsers } } }\"}">>,
          creds => {<<"admin@localhost">>,<<"a7d59dffcec277b6">>},
          role => {graphql,domain_admin},
          return_maps => true,method => <<"POST">>,return_headers => true}


*** User 2024-04-25 15:03:59.259 ***🔗
REST request fails:
Code: 401
Req: {<0.30036.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"450291590b2711e9">>},
       {<<"authorization">>,
        <<"Basic YWRtaW5AbG9jYWxob3N0OmE3ZDU5ZGZmY2VjMjc3YjY=">>}],
      <<"{\"variables\":{\"domain\":\"Localhost.bis\"},\"query\":\"query ($domain: DomainName!) { stat { domainStats(domain: $domain) { onlineUsers registeredUsers } } }\"}">>}
Result: {{<<"401">>,<<"Unauthorized">>},
         [{<<"vary">>,<<"accept">>},
          {<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 25 Apr 2024 15:03:59 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"201">>}],
         <<"{\"errors\":[{\"extensions\":{\"code\":\"no_permissions\"},\"path\":[\"ROOT\",\"stat\",\"domainStats\"],\"message\":\"Cannot execute query ROOT without permissions to the given domain. Args with invalid value: domain\"}]}">>,
         350,7074}
Params: #{port => 5541,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          body =>
              <<"{\"variables\":{\"domain\":\"Localhost.bis\"},\"query\":\"query ($domain: DomainName!) { stat { domainStats(domain: $domain) { onlineUsers registeredUsers } } }\"}">>,
          creds => {<<"admin@localhost">>,<<"a7d59dffcec277b6">>},
          role => {graphql,domain_admin},
          return_maps => true,method => <<"POST">>,return_headers => true}

*** CT 2024-04-25 15:03:59.261 *** View log from node mongooseim@localhost when finished🔗 mongooseim@localhost_1855.html



=== Ended at 2024-04-25 15:03:59
=== successfully completed test case
=== === Returned value: ok


Test run history | Top level test index | Latest test result