From a4f6953f271f2acdcc4859fb02315c2b176eaa71 Mon Sep 17 00:00:00 2001 From: Georges Chaudy Date: Tue, 29 Apr 2025 22:50:45 +0200 Subject: [PATCH] spanner: skip dasbhoard RBAC e2e tests for spanner (#104043) * skip dasbhoard RBAC e2e for spanner * annotations also relying on dashboard find --- .../annotations/annotationsimpl/annotations_test.go | 4 ++++ .../dashboards/database/database_folder_test.go | 3 +++ pkg/services/sqlstore/permissions/dashboard_test.go | 12 ++++++++++-- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/pkg/services/annotations/annotationsimpl/annotations_test.go b/pkg/services/annotations/annotationsimpl/annotations_test.go index 19b3c1cbe2e..ed3701f2aa3 100644 --- a/pkg/services/annotations/annotationsimpl/annotations_test.go +++ b/pkg/services/annotations/annotationsimpl/annotations_test.go @@ -204,6 +204,10 @@ func TestIntegrationAnnotationListingWithInheritedRBAC(t *testing.T) { t.Skip("skipping integration test") } + if db.IsTestDBSpanner() { + t.Skip("skipping integration test") + } + orgID := int64(1) permissions := []accesscontrol.Permission{ { diff --git a/pkg/services/dashboards/database/database_folder_test.go b/pkg/services/dashboards/database/database_folder_test.go index ec52d14989a..664c264c1cd 100644 --- a/pkg/services/dashboards/database/database_folder_test.go +++ b/pkg/services/dashboards/database/database_folder_test.go @@ -235,6 +235,9 @@ func TestIntegrationDashboardInheritedFolderRBAC(t *testing.T) { if testing.Short() { t.Skip("skipping integration test") } + if db.IsTestDBSpanner() { + t.Skip("skipping integration test") + } // the maximux nested folder hierarchy starting from parent down to subfolders nestedFolders := make([]*folder.Folder, 0, folder.MaxNestedFolderDepth+1) diff --git a/pkg/services/sqlstore/permissions/dashboard_test.go b/pkg/services/sqlstore/permissions/dashboard_test.go index 69ca82560d6..69f62f7b494 100644 --- a/pkg/services/sqlstore/permissions/dashboard_test.go +++ b/pkg/services/sqlstore/permissions/dashboard_test.go @@ -445,7 +445,9 @@ func TestIntegration_DashboardNestedPermissionFilter(t *testing.T) { expectedResult: []string{"parent"}, }, } - + if db.IsTestDBSpanner() { + t.Skip("skipping integration test") + } origNewGuardian := guardian.New guardian.MockDashboardGuardian(&guardian.FakeDashboardGuardian{CanViewValue: true, CanSaveValue: true}) t.Cleanup(func() { @@ -558,7 +560,9 @@ func TestIntegration_DashboardNestedPermissionFilter_WithSelfContainedPermission expectedResult: []string{"parent"}, }, } - + if db.IsTestDBSpanner() { + t.Skip("skipping integration test") + } origNewGuardian := guardian.New guardian.MockDashboardGuardian(&guardian.FakeDashboardGuardian{CanViewValue: true, CanSaveValue: true}) t.Cleanup(func() { @@ -672,6 +676,10 @@ func TestIntegration_DashboardNestedPermissionFilter_WithActionSets(t *testing.T }, } + if db.IsTestDBSpanner() { + t.Skip("skipping integration test") + } + origNewGuardian := guardian.New guardian.MockDashboardGuardian(&guardian.FakeDashboardGuardian{CanViewValue: true, CanSaveValue: true}) t.Cleanup(func() {