Replace check for integration tests. (#110707)
* Replace check for integration tests. * Revert changes in pkg/tsdb/mysql packages. * Fix formatting of few tests.
This commit is contained in:
@@ -26,6 +26,7 @@ import (
|
||||
"github.com/grafana/grafana/pkg/services/user"
|
||||
"github.com/grafana/grafana/pkg/setting"
|
||||
"github.com/grafana/grafana/pkg/tests/testsuite"
|
||||
"github.com/grafana/grafana/pkg/util/testutil"
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
@@ -33,9 +34,8 @@ func TestMain(m *testing.M) {
|
||||
}
|
||||
|
||||
func TestIntegrationUserAuthToken(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping integration test in short mode")
|
||||
}
|
||||
testutil.SkipIntegrationTestInShortMode(t)
|
||||
|
||||
ctx := createTestContext(t)
|
||||
usr := &user.User{ID: int64(10)}
|
||||
|
||||
@@ -790,9 +790,8 @@ func (c *testContext) updateRotatedAt(id, rotatedAt int64) (bool, error) {
|
||||
}
|
||||
|
||||
func TestIntegrationTokenCount(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping integration test in short mode")
|
||||
}
|
||||
testutil.SkipIntegrationTestInShortMode(t)
|
||||
|
||||
ctx := createTestContext(t)
|
||||
user := &user.User{ID: int64(10)}
|
||||
|
||||
@@ -830,9 +829,8 @@ func TestIntegrationTokenCount(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestIntegrationRevokeAllUserTokens(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping integration test in short mode")
|
||||
}
|
||||
testutil.SkipIntegrationTestInShortMode(t)
|
||||
|
||||
t.Run("should not fail if the external sessions could not be removed", func(t *testing.T) {
|
||||
ctx := createTestContext(t)
|
||||
usr := &user.User{ID: int64(10)}
|
||||
@@ -866,9 +864,8 @@ func TestIntegrationRevokeAllUserTokens(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestIntegrationRevokeToken(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping integration test in short mode")
|
||||
}
|
||||
testutil.SkipIntegrationTestInShortMode(t)
|
||||
|
||||
t.Run("should not fail if the external sessions could not be removed", func(t *testing.T) {
|
||||
ctx := createTestContext(t)
|
||||
usr := &user.User{ID: int64(10)}
|
||||
@@ -900,9 +897,8 @@ func TestIntegrationRevokeToken(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestIntegrationBatchRevokeAllUserTokens(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping integration test in short mode")
|
||||
}
|
||||
testutil.SkipIntegrationTestInShortMode(t)
|
||||
|
||||
t.Run("should not fail if the external sessions could not be removed", func(t *testing.T) {
|
||||
ctx := createTestContext(t)
|
||||
userIds := []int64{1, 2, 3}
|
||||
|
||||
Reference in New Issue
Block a user