Remove test-specific logic from generic test runner (#2215)

Revert changes to acceptance_test.go added in #2177 and add
test-specific fix.
This commit is contained in:
Denis Bilenko 2025-01-23 11:59:01 +01:00 committed by GitHub
parent 20c1902a45
commit ba3a400327
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 23 deletions

View File

@ -9,7 +9,6 @@ import (
"os"
"os/exec"
"path/filepath"
"regexp"
"runtime"
"slices"
"sort"
@ -452,16 +451,6 @@ func CopyDir(src, dst string, inputs, outputs map[string]bool) error {
}
func ListDir(t *testing.T, src string) ([]string, error) {
// exclude folders in .gitignore from comparison
ignored := []string{
"\\.ruff_cache",
"\\.venv",
".*\\.egg-info",
"__pycache__",
// depends on uv version
"uv.lock",
}
var files []string
err := filepath.Walk(src, func(path string, info os.FileInfo, err error) error {
if err != nil {
@ -469,19 +458,7 @@ func ListDir(t *testing.T, src string) ([]string, error) {
}
if info.IsDir() {
for _, ignoredFolder := range ignored {
if matched, _ := regexp.MatchString(ignoredFolder, info.Name()); matched {
return filepath.SkipDir
}
}
return nil
} else {
for _, ignoredFolder := range ignored {
if matched, _ := regexp.MatchString(ignoredFolder, info.Name()); matched {
return nil
}
}
}
relPath, err := filepath.Rel(src, path)

View File

@ -10,3 +10,5 @@ cat databricks.yml | grep -v databricks_cli_version > databricks.yml.new
mv databricks.yml.new databricks.yml
trace $CLI bundle validate -t dev --output json | jq ".resources"
rm -fr .venv resources/__pycache__ uv.lock my_jobs_as_code.egg-info