grafana/pkg/services/quota/quotaimpl/store_test.go
Sofia Papagiannaki 9855e74b92
Chore: Refactor quota service (#58643)
Chore: Refactor quota service (#57586)

* Chore: refactore quota service

* Apply suggestions from code review
2022-11-14 21:08:10 +02:00

29 lines
554 B
Go

package quotaimpl
import (
"context"
"testing"
"github.com/stretchr/testify/require"
"github.com/grafana/grafana/pkg/infra/db"
"github.com/grafana/grafana/pkg/services/quota"
)
func TestIntegrationQuotaDataAccess(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
ss := db.InitTestDB(t)
quotaStore := sqlStore{
db: ss,
}
t.Run("quota deleted", func(t *testing.T) {
ctx := quota.FromContext(context.Background(), &quota.TargetToSrv{})
err := quotaStore.DeleteByUser(ctx, 1)
require.NoError(t, err)
})
}