diff --git a/acceptance/acceptance_test.go b/acceptance/acceptance_test.go index 5f1181313c..850d3bf9d6 100644 --- a/acceptance/acceptance_test.go +++ b/acceptance/acceptance_test.go @@ -137,6 +137,13 @@ func runTest(t *testing.T, dir, coverDir string, repls testdiff.ReplacementsCont tmpDir = t.TempDir() } + repls.Set("/private"+tmpDir, "$TMPDIR") + repls.Set("/private"+filepath.Dir(tmpDir), "$TMPPARENT") + repls.Set("/private"+filepath.Dir(filepath.Dir(tmpDir)), "$TMPGPARENT") + repls.Set(tmpDir, "$TMPDIR") + repls.Set(filepath.Dir(tmpDir), "$TMPPARENT") + repls.Set(filepath.Dir(filepath.Dir(tmpDir)), "$TMPGPARENT") + scriptContents := readMergedScriptContents(t, dir) testutil.WriteFile(t, filepath.Join(tmpDir, EntryPointScript), scriptContents) diff --git a/acceptance/bundle/sync-paths-dotdot/databricks.yml b/acceptance/bundle/sync-paths-dotdot/databricks.yml new file mode 100644 index 0000000000..7215ffea29 --- /dev/null +++ b/acceptance/bundle/sync-paths-dotdot/databricks.yml @@ -0,0 +1,5 @@ +bundle: + name: test-bundle +sync: + paths: + - .. diff --git a/acceptance/bundle/sync-paths-dotdot/output.txt b/acceptance/bundle/sync-paths-dotdot/output.txt new file mode 100644 index 0000000000..11db3e9ee0 --- /dev/null +++ b/acceptance/bundle/sync-paths-dotdot/output.txt @@ -0,0 +1,11 @@ +Error: path "$TMPPARENT" is not within repository root "$TMPDIR" + +Name: test-bundle +Target: default +Workspace: + User: $USERNAME + Path: /Workspace/Users/$USERNAME/.bundle/test-bundle/default + +Found 1 error + +Exit code: 1 diff --git a/acceptance/bundle/sync-paths-dotdot/script b/acceptance/bundle/sync-paths-dotdot/script new file mode 100644 index 0000000000..72555b332a --- /dev/null +++ b/acceptance/bundle/sync-paths-dotdot/script @@ -0,0 +1 @@ +$CLI bundle validate