From 43436d7bce46a485180afb1034088662dcb36fb9 Mon Sep 17 00:00:00 2001 From: Artur Sawicki Date: Thu, 19 Dec 2024 11:56:00 +0100 Subject: [PATCH] Fix function tests requiring an active warehouse --- pkg/resources/function_java_acceptance_test.go | 1 + pkg/resources/function_python_acceptance_test.go | 5 +++++ pkg/resources/function_scala_acceptance_test.go | 1 + 3 files changed, 7 insertions(+) diff --git a/pkg/resources/function_java_acceptance_test.go b/pkg/resources/function_java_acceptance_test.go index 7104ba7996..7edf7905e3 100644 --- a/pkg/resources/function_java_acceptance_test.go +++ b/pkg/resources/function_java_acceptance_test.go @@ -199,6 +199,7 @@ func TestAcc_FunctionJava_InlineBasicDefaultArg(t *testing.T) { func TestAcc_FunctionJava_InlineFull(t *testing.T) { _ = testenvs.GetOrSkipTest(t, testenvs.EnableAcceptance) acc.TestAccPreCheck(t) + t.Setenv(string(testenvs.ConfigureClientOnce), "") stage, stageCleanup := acc.TestClient().Stage.CreateStage(t) t.Cleanup(stageCleanup) diff --git a/pkg/resources/function_python_acceptance_test.go b/pkg/resources/function_python_acceptance_test.go index 62c01b0ac6..487083c2c1 100644 --- a/pkg/resources/function_python_acceptance_test.go +++ b/pkg/resources/function_python_acceptance_test.go @@ -23,6 +23,10 @@ import ( ) func TestAcc_FunctionPython_InlineBasic(t *testing.T) { + _ = testenvs.GetOrSkipTest(t, testenvs.EnableAcceptance) + acc.TestAccPreCheck(t) + t.Setenv(string(testenvs.ConfigureClientOnce), "") + funcName := "some_function" argName := "x" dataType := testdatatypes.DataTypeNumber_36_2 @@ -110,6 +114,7 @@ func TestAcc_FunctionPython_InlineBasic(t *testing.T) { func TestAcc_FunctionPython_InlineFull(t *testing.T) { _ = testenvs.GetOrSkipTest(t, testenvs.EnableAcceptance) acc.TestAccPreCheck(t) + t.Setenv(string(testenvs.ConfigureClientOnce), "") secretId := acc.TestClient().Ids.RandomSchemaObjectIdentifier() secretId2 := acc.TestClient().Ids.RandomSchemaObjectIdentifier() diff --git a/pkg/resources/function_scala_acceptance_test.go b/pkg/resources/function_scala_acceptance_test.go index e0bdeb428f..a8361b4f4e 100644 --- a/pkg/resources/function_scala_acceptance_test.go +++ b/pkg/resources/function_scala_acceptance_test.go @@ -115,6 +115,7 @@ func TestAcc_FunctionScala_InlineBasic(t *testing.T) { func TestAcc_FunctionScala_InlineFull(t *testing.T) { _ = testenvs.GetOrSkipTest(t, testenvs.EnableAcceptance) acc.TestAccPreCheck(t) + t.Setenv(string(testenvs.ConfigureClientOnce), "") stage, stageCleanup := acc.TestClient().Stage.CreateStage(t) t.Cleanup(stageCleanup)