From 7366c699af0185b5c076bb0d194c225372473210 Mon Sep 17 00:00:00 2001 From: Andrew Nester Date: Tue, 20 Aug 2024 14:56:45 +0200 Subject: [PATCH] skip e2e test on aws --- internal/bundle/clusters_test.go | 5 +++++ internal/testutil/cloud.go | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/internal/bundle/clusters_test.go b/internal/bundle/clusters_test.go index cb6536be4..a961f3ea8 100644 --- a/internal/bundle/clusters_test.go +++ b/internal/bundle/clusters_test.go @@ -6,6 +6,7 @@ import ( "github.com/databricks/cli/internal" "github.com/databricks/cli/internal/acc" + "github.com/databricks/cli/internal/testutil" "github.com/databricks/cli/libs/env" "github.com/databricks/databricks-sdk-go/service/compute" "github.com/google/uuid" @@ -15,6 +16,10 @@ import ( func TestAccDeployBundleWithCluster(t *testing.T) { ctx, wt := acc.WorkspaceTest(t) + if testutil.IsAWSCloud(wt.T) { + t.Skip("Skipping test for AWS cloud because it is not permitted to create clusters") + } + nodeTypeId := internal.GetNodeTypeId(env.Get(ctx, "CLOUD_ENV")) uniqueId := uuid.New().String() root, err := initTestTemplate(t, ctx, "clusters", map[string]any{ diff --git a/internal/testutil/cloud.go b/internal/testutil/cloud.go index e547069f3..ba5b75ecf 100644 --- a/internal/testutil/cloud.go +++ b/internal/testutil/cloud.go @@ -49,3 +49,7 @@ func GetCloud(t *testing.T) Cloud { } return -1 } + +func IsAWSCloud(t *testing.T) bool { + return GetCloud(t) == AWS +}