@@ -332,8 +332,8 @@ def test_health_check_loki_success_grafana7(self, m):
332
332
# Mock the version inquiry request, because `smartquery` needs
333
333
# it, as Loki responses differ between versions.
334
334
m .get (
335
- "http://localhost/api/health " ,
336
- json = {"commit " : "unknown" , "database" : "ok " , "version" : "7.0.1" },
335
+ "http://localhost/api/frontend/settings " ,
336
+ json = {"buildInfo " : { "commit" : "unknown " , "version" : "7.0.1" } },
337
337
)
338
338
m .get (
339
339
"http://localhost/api/datasources/uid/vCyglaq7z" ,
@@ -364,8 +364,8 @@ def test_health_check_loki_success_grafana9(self, m):
364
364
# Mock the version inquiry request, because `smartquery` needs
365
365
# it, as Loki responses differ between versions.
366
366
m .get (
367
- "http://localhost/api/health " ,
368
- json = {"commit " : "14e988bd22" , "database" : "ok " , "version" : "9.0.1" },
367
+ "http://localhost/api/frontend/settings " ,
368
+ json = {"buildInfo " : { "commit" : "14e988bd22 " , "version" : "9.0.1" } },
369
369
)
370
370
m .get (
371
371
"http://localhost/api/datasources/uid/vCyglaq7z" ,
@@ -396,8 +396,8 @@ def test_health_check_loki_error_response_failure_grafana7(self, m):
396
396
# Mock the version inquiry request, because `smartquery` needs
397
397
# it, as Loki responses differ between versions.
398
398
m .get (
399
- "http://localhost/api/health " ,
400
- json = {"commit " : "unknown" , "database" : "ok " , "version" : "7.0.1" },
399
+ "http://localhost/api/frontend/settings " ,
400
+ json = {"buildInfo " : { "commit" : "unknown " , "version" : "7.0.1" } },
401
401
)
402
402
m .get (
403
403
"http://localhost/api/datasources/uid/vCyglaq7z" ,
@@ -428,8 +428,8 @@ def test_health_check_loki_error_response_failure_grafana9(self, m):
428
428
# Mock the version inquiry request, because `smartquery` needs
429
429
# it, as Loki responses differ between versions.
430
430
m .get (
431
- "http://localhost/api/health " ,
432
- json = {"commit " : "14e988bd22" , "database" : "ok " , "version" : "9.0.1" },
431
+ "http://localhost/api/frontend/settings " ,
432
+ json = {"buildInfo " : { "commit" : "14e988bd22 " , "version" : "9.0.1" } },
433
433
)
434
434
m .get (
435
435
"http://localhost/api/datasources/uid/vCyglaq7z" ,
@@ -565,8 +565,8 @@ def test_health_check_prometheus_healthy_success(self, grafana_version):
565
565
# Mock the version inquiry request, because `smartquery` needs
566
566
# it, as Prometheus responses differ between versions.
567
567
m .get (
568
- "http://localhost/api/health " ,
569
- json = {"commit " : "unknown" , "database" : "ok " , "version" : grafana_version },
568
+ "http://localhost/api/frontend/settings " ,
569
+ json = {"buildInfo " : { "commit" : "unknown " , "version" : grafana_version } },
570
570
)
571
571
m .get (
572
572
"http://localhost/api/datasources/uid/h8KkCLt7z" ,
@@ -599,8 +599,8 @@ def test_health_check_prometheus_empty_dataframe_success(self, grafana_version):
599
599
# Mock the version inquiry request, because `smartquery` needs
600
600
# it, as Prometheus responses differ between versions.
601
601
m .get (
602
- "http://localhost/api/health " ,
603
- json = {"commit " : "unknown" , "database" : "ok " , "version" : grafana_version },
602
+ "http://localhost/api/frontend/settings " ,
603
+ json = {"buildInfo " : { "commit" : "unknown " , "version" : grafana_version } },
604
604
)
605
605
m .get (
606
606
"http://localhost/api/datasources/uid/h8KkCLt7z" ,
@@ -633,8 +633,8 @@ def test_health_check_prometheus_invalid_dataframe_failure(self, grafana_version
633
633
# Mock the version inquiry request, because `smartquery` needs
634
634
# it, as Prometheus responses differ between versions.
635
635
m .get (
636
- "http://localhost/api/health " ,
637
- json = {"commit " : "unknown" , "database" : "ok " , "version" : grafana_version },
636
+ "http://localhost/api/frontend/settings " ,
637
+ json = {"buildInfo " : { "commit" : "unknown " , "version" : grafana_version } },
638
638
)
639
639
m .get (
640
640
"http://localhost/api/datasources/uid/h8KkCLt7z" ,
@@ -1161,8 +1161,8 @@ def setUp(self):
1161
1161
@requests_mock .Mocker ()
1162
1162
def test_health_inquiry_native_prometheus_success (self , m ):
1163
1163
m .get (
1164
- "http://localhost/api/health " ,
1165
- json = {"commit " : "14e988bd22" , "database" : "ok " , "version" : "9.0.1" },
1164
+ "http://localhost/api/frontend/settings " ,
1165
+ json = {"buildInfo " : { "commit" : "14e988bd22 " , "version" : "9.0.1" } },
1166
1166
)
1167
1167
m .get (
1168
1168
"http://localhost/api/datasources/uid/39mf288en" ,
@@ -1191,8 +1191,8 @@ def test_health_inquiry_native_prometheus_success(self, m):
1191
1191
@requests_mock .Mocker ()
1192
1192
def test_health_inquiry_native_prometheus_failure (self , m ):
1193
1193
m .get (
1194
- "http://localhost/api/health " ,
1195
- json = {"commit " : "14e988bd22" , "database" : "ok " , "version" : "9.0.1" },
1194
+ "http://localhost/api/frontend/settings " ,
1195
+ json = {"buildInfo " : { "commit" : "14e988bd22 " , "version" : "9.0.1" } },
1196
1196
)
1197
1197
m .get (
1198
1198
"http://localhost/api/datasources/uid/39mf288en" ,
@@ -1221,8 +1221,8 @@ def test_health_inquiry_native_prometheus_failure(self, m):
1221
1221
@requests_mock .Mocker ()
1222
1222
def test_health_inquiry_native_unknown_error_400 (self , m ):
1223
1223
m .get (
1224
- "http://localhost/api/health " ,
1225
- json = {"commit " : "14e988bd22" , "database" : "ok " , "version" : "9.0.1" },
1224
+ "http://localhost/api/frontend/settings " ,
1225
+ json = {"buildInfo " : { "commit" : "14e988bd22 " , "version" : "9.0.1" } },
1226
1226
)
1227
1227
m .get (
1228
1228
"http://localhost/api/datasources/uid/39mf288en" ,
@@ -1252,8 +1252,8 @@ def test_health_inquiry_native_unknown_error_400(self, m):
1252
1252
@requests_mock .Mocker ()
1253
1253
def test_health_inquiry_native_unknown_error_418 (self , m ):
1254
1254
m .get (
1255
- "http://localhost/api/health " ,
1256
- json = {"commit " : "14e988bd22" , "database" : "ok " , "version" : "9.0.1" },
1255
+ "http://localhost/api/frontend/settings " ,
1256
+ json = {"buildInfo " : { "commit" : "14e988bd22 " , "version" : "9.0.1" } },
1257
1257
)
1258
1258
m .get (
1259
1259
"http://localhost/api/datasources/uid/39mf288en" ,
@@ -1271,8 +1271,8 @@ def test_health_inquiry_native_unknown_error_418(self, m):
1271
1271
@requests_mock .Mocker ()
1272
1272
def test_health_inquiry_native_prometheus_error_404 (self , m ):
1273
1273
m .get (
1274
- "http://localhost/api/health " ,
1275
- json = {"commit " : "14e988bd22" , "database" : "ok " , "version" : "9.0.1" },
1274
+ "http://localhost/api/frontend/settings " ,
1275
+ json = {"buildInfo " : { "commit" : "14e988bd22 " , "version" : "9.0.1" } },
1276
1276
)
1277
1277
m .get (
1278
1278
"http://localhost/api/datasources/uid/h8KkCLt7z" ,
@@ -1308,8 +1308,8 @@ def test_health_inquiry_native_prometheus_error_404(self, m):
1308
1308
@requests_mock .Mocker ()
1309
1309
def test_health_inquiry_native_prometheus_error_500 (self , m ):
1310
1310
m .get (
1311
- "http://localhost/api/health " ,
1312
- json = {"commit " : "14e988bd22" , "database" : "ok " , "version" : "9.0.1" },
1311
+ "http://localhost/api/frontend/settings " ,
1312
+ json = {"buildInfo " : { "commit" : "14e988bd22 " , "version" : "9.0.1" } },
1313
1313
)
1314
1314
m .get (
1315
1315
"http://localhost/api/datasources/uid/h8KkCLt7z" ,
0 commit comments