Chore: All tests under pkg/tests should be integration tests (#59521)

* Chore: All tests under pkg/tests should be integrationtests

* run alerting integration tests only for sqlite
This commit is contained in:
Marcus Efraimsson
2022-12-09 08:11:56 +01:00
committed by GitHub
parent 896cb9ddce
commit 2db8ed9441
13 changed files with 111 additions and 31 deletions

View File

@@ -34,7 +34,9 @@ type Response struct {
TraceID string `json:"traceID"`
}
func TestAMConfigAccess(t *testing.T) {
func TestIntegrationAMConfigAccess(t *testing.T) {
testinfra.SQLiteIntegrationTest(t)
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
EnableUnifiedAlerting: true,
@@ -392,7 +394,9 @@ func TestAMConfigAccess(t *testing.T) {
})
}
func TestAlertAndGroupsQuery(t *testing.T) {
func TestIntegrationAlertAndGroupsQuery(t *testing.T) {
testinfra.SQLiteIntegrationTest(t)
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
EnableUnifiedAlerting: true,
@@ -549,7 +553,9 @@ func TestAlertAndGroupsQuery(t *testing.T) {
}
}
func TestRulerAccess(t *testing.T) {
func TestIntegrationRulerAccess(t *testing.T) {
testinfra.SQLiteIntegrationTest(t)
// Setup Grafana and its Database
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
@@ -664,7 +670,9 @@ func TestRulerAccess(t *testing.T) {
}
}
func TestDeleteFolderWithRules(t *testing.T) {
func TestIntegrationDeleteFolderWithRules(t *testing.T) {
testinfra.SQLiteIntegrationTest(t)
// Setup Grafana and its Database
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
@@ -824,7 +832,9 @@ func TestDeleteFolderWithRules(t *testing.T) {
}
}
func TestAlertRuleCRUD(t *testing.T) {
func TestIntegrationAlertRuleCRUD(t *testing.T) {
testinfra.SQLiteIntegrationTest(t)
// Setup Grafana and its Database
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
@@ -1802,7 +1812,9 @@ func TestAlertRuleCRUD(t *testing.T) {
}
}
func TestAlertmanagerStatus(t *testing.T) {
func TestIntegrationAlertmanagerStatus(t *testing.T) {
testinfra.SQLiteIntegrationTest(t)
// Setup Grafana and its Database
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
@@ -1865,7 +1877,9 @@ func TestAlertmanagerStatus(t *testing.T) {
}
}
func TestQuota(t *testing.T) {
func TestIntegrationQuota(t *testing.T) {
testinfra.SQLiteIntegrationTest(t)
// Setup Grafana and its Database
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,
@@ -2064,7 +2078,9 @@ func TestQuota(t *testing.T) {
})
}
func TestEval(t *testing.T) {
func TestIntegrationEval(t *testing.T) {
testinfra.SQLiteIntegrationTest(t)
// Setup Grafana and its Database
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
DisableLegacyAlerting: true,