From 804892bacd401dc1427c5eee8ebaa98062f78565 Mon Sep 17 00:00:00 2001 From: Gareth Kirwan Date: Wed, 30 Oct 2024 13:37:15 +0700 Subject: [PATCH] Tests: Fix fail on vendored modules This fixes looking for LICENSE files in the vendor directory --- internal/testing/utils/path_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/testing/utils/path_test.go b/internal/testing/utils/path_test.go index 623455f79b8..4ae77303b77 100644 --- a/internal/testing/utils/path_test.go +++ b/internal/testing/utils/path_test.go @@ -27,6 +27,9 @@ func TestRootPathFromCWD(t *testing.T) { w, _ := filepath.Split(p) w = filepath.Clean(w) if w == r { + if d.Name() == "vendor" { + return filepath.SkipDir + } return nil } if d.Type().IsRegular() && d.Name() == "LICENSE" {