mirror of https://github.com/databricks/cli.git
Add acceptance for test for sync.paths equal to two dots (#2196)
Based on integration test from @andrewnester in #2194 Manually checked that this databricks.yml passes validation on v0.235.0 but fails on v0.236.0, very like it was broken in https://github.com/databricks/cli/pull/1945 This also adds replacements for tmpdir, it's parent and (just in case) grand parent.
This commit is contained in:
parent
33613b5d2a
commit
de5155ed0a
|
@ -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)
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
bundle:
|
||||
name: test-bundle
|
||||
sync:
|
||||
paths:
|
||||
- ..
|
|
@ -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
|
|
@ -0,0 +1 @@
|
|||
$CLI bundle validate
|
Loading…
Reference in New Issue