From 13fa43e0f5af0c2b0d5a6397ca7273a36548cbc1 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Tue, 17 Dec 2024 18:34:09 +0100 Subject: [PATCH] Remove superfluous helper (#2028) ## Changes There was only one helper for AWS and not the other clouds. Found this when looking through double calls to `acc.WorkspaceTest()` (see `TestPythonWheelTaskDeployAndRunOnInteractiveCluster`). ## Tests n/a --- integration/bundle/clusters_test.go | 6 +++--- integration/bundle/python_wheel_test.go | 4 +--- internal/testutil/cloud.go | 4 ---- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/integration/bundle/clusters_test.go b/integration/bundle/clusters_test.go index c153b873..44920620 100644 --- a/integration/bundle/clusters_test.go +++ b/integration/bundle/clusters_test.go @@ -12,12 +12,12 @@ import ( ) func TestDeployBundleWithCluster(t *testing.T) { - ctx, wt := acc.WorkspaceTest(t) - - if testutil.IsAWSCloud(wt) { + if testutil.GetCloud(t) == testutil.AWS { t.Skip("Skipping test for AWS cloud because it is not permitted to create clusters") } + ctx, wt := acc.WorkspaceTest(t) + nodeTypeId := testutil.GetCloud(t).NodeTypeID() uniqueId := uuid.New().String() root := initTestTemplate(t, ctx, "clusters", map[string]any{ diff --git a/integration/bundle/python_wheel_test.go b/integration/bundle/python_wheel_test.go index f7fb1ff3..62846f7b 100644 --- a/integration/bundle/python_wheel_test.go +++ b/integration/bundle/python_wheel_test.go @@ -56,9 +56,7 @@ func TestPythonWheelTaskDeployAndRunWithWrapper(t *testing.T) { } func TestPythonWheelTaskDeployAndRunOnInteractiveCluster(t *testing.T) { - _, wt := acc.WorkspaceTest(t) - - if testutil.IsAWSCloud(wt) { + if testutil.GetCloud(t) == testutil.AWS { t.Skip("Skipping test for AWS cloud because it is not permitted to create clusters") } diff --git a/internal/testutil/cloud.go b/internal/testutil/cloud.go index 4a8a8964..33921db0 100644 --- a/internal/testutil/cloud.go +++ b/internal/testutil/cloud.go @@ -58,7 +58,3 @@ func GetCloud(t TestingT) Cloud { } return -1 } - -func IsAWSCloud(t TestingT) bool { - return GetCloud(t) == AWS -}