Skip to content

Commit a988e53

Browse files
committed
Remove acceptance test changes (moved to the follow up)
1 parent d95fc1d commit a988e53

File tree

5 files changed

+5
-85
lines changed

5 files changed

+5
-85
lines changed

acceptance/acceptance_test.go

Lines changed: 5 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ func testAccept(t *testing.T, inprocessMode bool, singleTest string) int {
163163
}
164164

165165
// Download terraform and provider and create config.
166-
RunCommand(t, []string{"python3", filepath.Join(cwd, "install_terraform.py"), "--targetdir", terraformDir}, ".", []string{})
166+
RunCommand(t, []string{"python3", filepath.Join(cwd, "install_terraform.py"), "--targetdir", terraformDir}, ".")
167167

168168
wheelPath := buildDatabricksBundlesWheel(t, buildDir)
169169
if wheelPath != "" {
@@ -234,12 +234,6 @@ func testAccept(t *testing.T, inprocessMode bool, singleTest string) int {
234234
}
235235
}
236236

237-
if cloudEnv != "" && UseVersion == "" {
238-
// Create linux release artifacts, to be used by the cloud-only ssh tunnel tests
239-
releasesDir := CreateReleaseArtifacts(t, cwd, "linux")
240-
t.Setenv("CLI_RELEASES_DIR", releasesDir)
241-
}
242-
243237
testDefaultWarehouseId := os.Getenv("TEST_DEFAULT_WAREHOUSE_ID")
244238
if testDefaultWarehouseId != "" {
245239
repls.Set(testDefaultWarehouseId, "[TEST_DEFAULT_WAREHOUSE_ID]")
@@ -905,62 +899,10 @@ func BuildCLI(t *testing.T, buildDir, coverDir string) string {
905899
args = append(args, "-buildvcs=false")
906900
}
907901

908-
RunCommand(t, args, "..", []string{})
902+
RunCommand(t, args, "..")
909903
return execPath
910904
}
911905

912-
// CreateReleaseArtifacts builds release artifacts for the given OS using amd64 and arm64 architectures,
913-
// archives them into zip files, and returns the directory containing the release artifacts.
914-
func CreateReleaseArtifacts(t *testing.T, cwd, osName string) string {
915-
releasesDir := filepath.Join(cwd, "build", "releases")
916-
require.NoError(t, os.MkdirAll(releasesDir, os.ModePerm))
917-
arches := []string{"amd64", "arm64"}
918-
for _, arch := range arches {
919-
CreateReleaseArtifact(t, cwd, releasesDir, osName, arch)
920-
}
921-
return releasesDir
922-
}
923-
924-
func CreateReleaseArtifact(t *testing.T, cwd, releasesDir, osName, arch string) {
925-
tempBuildDir := filepath.Join(releasesDir, "tmp_"+arch)
926-
require.NoError(t, os.MkdirAll(tempBuildDir, os.ModePerm))
927-
defer os.RemoveAll(tempBuildDir)
928-
929-
execPath := filepath.Join(tempBuildDir, "databricks")
930-
args := []string{"go", "build", "-o", execPath}
931-
RunCommand(t, args, "..", []string{"GOOS=" + osName, "GOARCH=" + arch})
932-
933-
zipName := fmt.Sprintf("databricks_cli_%s_%s.zip", osName, arch)
934-
zipPath := filepath.Join(releasesDir, zipName)
935-
936-
zipFile, err := os.Create(zipPath)
937-
require.NoError(t, err)
938-
defer zipFile.Close()
939-
940-
zipWriter := zip.NewWriter(zipFile)
941-
defer zipWriter.Close()
942-
943-
info, err := os.Stat(execPath)
944-
require.NoError(t, err)
945-
946-
header, err := zip.FileInfoHeader(info)
947-
require.NoError(t, err)
948-
header.Name = "databricks"
949-
header.Method = zip.Deflate
950-
951-
writer, err := zipWriter.CreateHeader(header)
952-
require.NoError(t, err)
953-
954-
binaryFile, err := os.Open(execPath)
955-
require.NoError(t, err)
956-
defer binaryFile.Close()
957-
958-
_, err = io.Copy(writer, binaryFile)
959-
require.NoError(t, err)
960-
961-
t.Logf("Created %s %s release: %s", osName, arch, zipPath)
962-
}
963-
964906
// DownloadCLI downloads a released CLI binary archive for the given version,
965907
// extracts the executable, and returns its path.
966908
func DownloadCLI(t *testing.T, buildDir, version string) string {
@@ -1181,11 +1123,10 @@ func getUVDefaultCacheDir(t *testing.T) string {
11811123
}
11821124
}
11831125

1184-
func RunCommand(t *testing.T, args []string, dir string, env []string) {
1126+
func RunCommand(t *testing.T, args []string, dir string) {
11851127
start := time.Now()
11861128
cmd := exec.Command(args[0], args[1:]...)
11871129
cmd.Dir = dir
1188-
cmd.Env = append(os.Environ(), env...)
11891130
out, err := cmd.CombinedOutput()
11901131
elapsed := time.Since(start)
11911132
t.Logf("%s took %s", args, elapsed)
@@ -1307,7 +1248,7 @@ func buildDatabricksBundlesWheel(t *testing.T, buildDir string) string {
13071248
// so we prepare here by keeping only one.
13081249
_ = prepareWheelBuildDirectory(t, buildDir)
13091250

1310-
RunCommand(t, []string{"uv", "build", "--no-cache", "-q", "--wheel", "--out-dir", buildDir}, "../experimental/python", []string{})
1251+
RunCommand(t, []string{"uv", "build", "--no-cache", "-q", "--wheel", "--out-dir", buildDir}, "../experimental/python")
13111252

13121253
latestWheel := prepareWheelBuildDirectory(t, buildDir)
13131254
if latestWheel == "" {
@@ -1435,7 +1376,7 @@ func BuildYamlfmt(t *testing.T) {
14351376
args := []string{
14361377
"make", "-s", "tools/yamlfmt" + exeSuffix,
14371378
}
1438-
RunCommand(t, args, "..", []string{})
1379+
RunCommand(t, args, "..")
14391380
}
14401381

14411382
func loadUserReplacements(t *testing.T, repls *testdiff.ReplacementsContext, tmpDir string) {

acceptance/ssh/connection/out.test.toml

Lines changed: 0 additions & 6 deletions
This file was deleted.

acceptance/ssh/connection/output.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

acceptance/ssh/connection/script

Lines changed: 0 additions & 8 deletions
This file was deleted.

acceptance/ssh/connection/test.toml

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)