Chore: Omit integration tests if short test flag is passed (#108777)
* omit integration tests if short test flag is passed * Update pkg/services/ngalert/models/receivers_test.go Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com> * Update pkg/tests/api/alerting/api_ruler_test.go Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com> * Update pkg/tests/api/alerting/api_ruler_test.go Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com> * Update pkg/tests/api/alerting/api_ruler_test.go Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com> * Update pkg/tests/api/alerting/api_ruler_test.go Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com> * Update pkg/tests/api/alerting/api_ruler_test.go Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com> * Update pkg/services/ngalert/models/receivers_test.go Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com> * Update pkg/cmd/grafana-cli/commands/datamigrations/to_unified_storage_test.go Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com> * Update pkg/services/ngalert/models/receivers_test.go Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com> * fix the rest * false positive --------- Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
This commit is contained in:
co-authored by
Matheus Macabu
parent
1a7a7f1d99
commit
a95fb3a37c
@@ -382,6 +382,9 @@ func TestIntegration_DashboardPermissionFilter_WithSelfContainedPermissions(t *t
|
||||
}
|
||||
|
||||
func TestIntegration_DashboardNestedPermissionFilter(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping integration test in short mode")
|
||||
}
|
||||
testCases := []struct {
|
||||
desc string
|
||||
queryType string
|
||||
@@ -489,6 +492,9 @@ func TestIntegration_DashboardNestedPermissionFilter(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestIntegration_DashboardNestedPermissionFilter_WithSelfContainedPermissions(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping integration test in short mode")
|
||||
}
|
||||
testCases := []struct {
|
||||
desc string
|
||||
queryType string
|
||||
@@ -601,6 +607,9 @@ func TestIntegration_DashboardNestedPermissionFilter_WithSelfContainedPermission
|
||||
}
|
||||
|
||||
func TestIntegration_DashboardNestedPermissionFilter_WithActionSets(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping integration test in short mode")
|
||||
}
|
||||
testCases := []struct {
|
||||
desc string
|
||||
queryType string
|
||||
|
||||
@@ -8,6 +8,9 @@ import (
|
||||
)
|
||||
|
||||
func TestIntegrationFolderUIDFilter(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping integration test in short mode")
|
||||
}
|
||||
testCases := []struct {
|
||||
description string
|
||||
uids []string
|
||||
|
||||
@@ -32,6 +32,9 @@ func TestMain(m *testing.M) {
|
||||
}
|
||||
|
||||
func TestIntegrationBuilder_EqualResults_Basic(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping integration test in short mode")
|
||||
}
|
||||
user := &user.SignedInUser{
|
||||
UserID: 1,
|
||||
OrgID: 1,
|
||||
@@ -76,6 +79,9 @@ func TestIntegrationBuilder_EqualResults_Basic(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestIntegrationBuilder_Pagination(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping integration test in short mode")
|
||||
}
|
||||
user := &user.SignedInUser{
|
||||
UserID: 1,
|
||||
OrgID: 1,
|
||||
@@ -123,6 +129,9 @@ func TestIntegrationBuilder_Pagination(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestIntegrationBuilder_RBAC(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping integration test in short mode")
|
||||
}
|
||||
testsCases := []struct {
|
||||
desc string
|
||||
userPermissions []accesscontrol.Permission
|
||||
|
||||
@@ -13,6 +13,9 @@ import (
|
||||
)
|
||||
|
||||
func TestIntegration_RetryingDisabled(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping integration test in short mode")
|
||||
}
|
||||
store, _ := InitTestDB(t)
|
||||
retryErrors := getRetryErrors(t, store)
|
||||
|
||||
@@ -61,6 +64,9 @@ func TestIntegration_RetryingDisabled(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestIntegration_RetryingOnFailures(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping integration test in short mode")
|
||||
}
|
||||
store, _ := InitTestDB(t)
|
||||
retryErrors := getRetryErrors(t, store)
|
||||
store.dbCfg.QueryRetries = 5
|
||||
|
||||
@@ -24,6 +24,9 @@ func TestMain(m *testing.M) {
|
||||
}
|
||||
|
||||
func TestIntegrationIsUniqueConstraintViolation(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping integration test in short mode")
|
||||
}
|
||||
store, _ := InitTestDB(t)
|
||||
|
||||
testCases := []struct {
|
||||
|
||||
Reference in New Issue
Block a user