From ad2e93c0fd16384d41ba5d2a63640d705e44ae05 Mon Sep 17 00:00:00 2001 From: Joyce Ling <115662568+sfc-gh-ext-simba-jl@users.noreply.github.com> Date: Wed, 11 Oct 2023 22:25:49 -0700 Subject: [PATCH] revert use role sysadmin test changes --- file_transfer_agent_test.go | 3 +++ put_get_test.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/file_transfer_agent_test.go b/file_transfer_agent_test.go index e608c9544..7a591d414 100644 --- a/file_transfer_agent_test.go +++ b/file_transfer_agent_test.go @@ -63,6 +63,9 @@ func TestUnitDownloadWithInvalidLocalPath(t *testing.T) { f.Close() runDBTest(t, func(dbt *DBTest) { + if _, err = dbt.exec("use role sysadmin"); err != nil { + t.Skip("snowflake admin account not accessible") + } dbt.mustExec("rm @~/test_get") sqlText := fmt.Sprintf("put file://%v @~/test_get", testData) sqlText = strings.ReplaceAll(sqlText, "\\", "\\\\") diff --git a/put_get_test.go b/put_get_test.go index 6c4403630..730efbcbb 100644 --- a/put_get_test.go +++ b/put_get_test.go @@ -268,6 +268,9 @@ func TestPutWithAutoCompressFalse(t *testing.T) { defer f.Close() runDBTest(t, func(dbt *DBTest) { + if _, err = dbt.exec("use role sysadmin"); err != nil { + t.Skip("snowflake admin account not accessible") + } dbt.mustExec("rm @~/test_put_uncompress_file") sqlText := fmt.Sprintf("put file://%v @~/test_put_uncompress_file auto_compress=FALSE", testData) sqlText = strings.ReplaceAll(sqlText, "\\", "\\\\")