Skip to content

Commit 4511417

Browse files
committed
Add acceptance for test for sync.paths: ".."
Based on integration test from @andrewnester in #2194
1 parent 41bbd89 commit 4511417

File tree

4 files changed

+21
-0
lines changed

4 files changed

+21
-0
lines changed

acceptance/acceptance_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ func runTest(t *testing.T, dir, coverDir string, repls testdiff.ReplacementsCont
137137
tmpDir = t.TempDir()
138138
}
139139

140+
repls.Set(tmpDir, "$TMPDIR")
141+
repls.Set(filepath.Dir(tmpDir), "$TMPPARENT")
142+
repls.Set(filepath.Dir(filepath.Dir(tmpDir)), "$TMPGPARENT")
143+
140144
scriptContents := readMergedScriptContents(t, dir)
141145
testutil.WriteFile(t, filepath.Join(tmpDir, EntryPointScript), scriptContents)
142146

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
bundle:
2+
name: test-bundle
3+
sync:
4+
paths:
5+
- ..
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Error: path "$TMPPARENT" is not within repository root "$TMPDIR"
2+
3+
Name: test-bundle
4+
Target: default
5+
Workspace:
6+
User: $USERNAME
7+
Path: /Workspace/Users/$USERNAME/.bundle/test-bundle/default
8+
9+
Found 1 error
10+
11+
Exit code: 1
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
$CLI bundle validate

0 commit comments

Comments
 (0)