* Replace check for integration tests. * Revert changes in pkg/tsdb/mysql packages. * Fix formatting of few tests.
33 lines
684 B
Go
33 lines
684 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"
|
|
"github.com/grafana/grafana/pkg/tests/testsuite"
|
|
"github.com/grafana/grafana/pkg/util/testutil"
|
|
)
|
|
|
|
func TestMain(m *testing.M) {
|
|
testsuite.Run(m)
|
|
}
|
|
|
|
func TestIntegrationQuotaDataAccess(t *testing.T) {
|
|
testutil.SkipIntegrationTestInShortMode(t)
|
|
|
|
ss := db.InitTestDB(t)
|
|
quotaStore := sqlStore{
|
|
db: ss,
|
|
}
|
|
|
|
t.Run("quota deleted", func(t *testing.T) {
|
|
ctx := quota.FromContext(context.Background(), "a.TargetToSrv{})
|
|
err := quotaStore.DeleteByUser(ctx, 1)
|
|
require.NoError(t, err)
|
|
})
|
|
}
|