mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Mark all tests that interact with the database as Integration tests. (#54875)
Previously, two tests were not explicitly marked as integration tests and so were not run against all 3 supported databases in the CI environment.
This commit is contained in:
parent
b24be6c0fc
commit
7312a2dab0
@ -17,7 +17,7 @@ import (
|
||||
"github.com/grafana/grafana/pkg/util"
|
||||
)
|
||||
|
||||
func TestUpdateAlertRules(t *testing.T) {
|
||||
func TestIntegrationUpdateAlertRules(t *testing.T) {
|
||||
sqlStore := sqlstore.InitTestDB(t)
|
||||
store := DBstore{
|
||||
SQLStore: sqlStore,
|
||||
@ -26,7 +26,6 @@ func TestUpdateAlertRules(t *testing.T) {
|
||||
},
|
||||
}
|
||||
createRule := func(t *testing.T) *models.AlertRule {
|
||||
t.Helper()
|
||||
rule := models.AlertRuleGen(withIntervalMatching(store.Cfg.BaseInterval))()
|
||||
err := sqlStore.WithDbSession(context.Background(), func(sess *sqlstore.DBSession) error {
|
||||
_, err := sess.Table(models.AlertRule{}).InsertOne(rule)
|
||||
@ -94,7 +93,7 @@ func withIntervalMatching(baseInterval time.Duration) func(*models.AlertRule) {
|
||||
}
|
||||
}
|
||||
|
||||
func Test_getFilterByOrgsString(t *testing.T) {
|
||||
func TestIntegration_getFilterByOrgsString(t *testing.T) {
|
||||
testCases := []struct {
|
||||
testName string
|
||||
orgs map[int64]struct{}
|
||||
|
@ -14,7 +14,7 @@ import (
|
||||
|
||||
const testAlertingIntervalSeconds = 10
|
||||
|
||||
func TestProvisioningStore(t *testing.T) {
|
||||
func TestIntegrationProvisioningStore(t *testing.T) {
|
||||
store := createProvisioningStoreSut(tests.SetupTestEnv(t, testAlertingIntervalSeconds))
|
||||
|
||||
t.Run("Default provenance of a known type is None", func(t *testing.T) {
|
||||
|
Loading…
Reference in New Issue
Block a user