Skip to content

Commit

Permalink
acc: Restore unexpected output error (#2243)
Browse files Browse the repository at this point in the history
## Changes
Restore original behaviour of acceptance tests: any unaccounted for
files trigger an error (not just those that start with "out"). This got
changed in
https://github.com/databricks/cli/pull/2146/files#diff-2bb968d823f4afb825e1dcea2879bdbdedf2b7c15d4e77f47905691b14246a04L196
which started only checking files starting with "out*" and skipping
everything else.

## Tests
Existing tests.
  • Loading branch information
denik authored Jan 28, 2025
1 parent be908ee commit 60709e3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions acceptance/acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ func runTest(t *testing.T, dir, coverDir string, repls testdiff.ReplacementsCont
if _, ok := outputs[relPath]; ok {
continue
}
t.Errorf("Unexpected output: %s", relPath)
if strings.HasPrefix(relPath, "out") {
// We have a new file starting with "out"
// Show the contents & support overwrite mode for it:
Expand Down
3 changes: 2 additions & 1 deletion acceptance/bundle/git-permerror/script
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ trace chmod 000 .git/config
errcode trace $CLI bundle validate -o json | jq .bundle.git
errcode trace withdir subdir/a/b $CLI bundle validate -o json | jq .bundle.git

rm -fr .git
cd ..
rm -fr myrepo
4 changes: 3 additions & 1 deletion acceptance/bundle/syncroot/dotdot-git/script
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ mkdir myrepo
cd myrepo
cp ../databricks.yml .
git-repo-init
$CLI bundle validate | sed 's/\\\\/\//g'
errcode $CLI bundle validate
cd ..
rm -fr myrepo
3 changes: 3 additions & 0 deletions acceptance/bundle/syncroot/dotdot-git/test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[[Repls]]
Old = '\\\\myrepo'
New = '/myrepo'

0 comments on commit 60709e3

Please sign in to comment.