tests: Fix TestRootPathFromCWD LICENSE check for web and vendor directories (#1695)

This fixes looking for LICENSE files in the vendor directory
This commit is contained in:
Gareth Kirwan
2024-10-31 02:17:43 +01:00
committed by GitHub
parent e1b24e22c1
commit 19f8bc45cd

View File

@@ -27,6 +27,10 @@ func TestRootPathFromCWD(t *testing.T) {
w, _ := filepath.Split(p)
w = filepath.Clean(w)
if w == r {
switch d.Name() {
case "vendor", "web":
return filepath.SkipDir
}
return nil
}
if d.Type().IsRegular() && d.Name() == "LICENSE" {