diff --git a/internal/test/env/env.go b/internal/test/env/env.go index 3c0deb26798..5426eacfa53 100644 --- a/internal/test/env/env.go +++ b/internal/test/env/env.go @@ -49,7 +49,7 @@ var ( logger = record.NewLogger(record.WithThreshold(pointer.Int(1)), record.WithWriter(ginkgo.GinkgoWriter)) scheme = runtime.NewScheme() env *envtest.Environment - clusterAPIVersionRegex = regexp.MustCompile(`^(\W)sigs.k8s.io/cluster-api v(.+)`) + clusterAPIVersionRegex = regexp.MustCompile(`^(\W)sigs\.k8s\.io/cluster-api v(.+)`) ) func init() { diff --git a/internal/test/env/env_test.go b/internal/test/env/env_test.go index fae15fb53f3..5181094d556 100644 --- a/internal/test/env/env_test.go +++ b/internal/test/env/env_test.go @@ -28,5 +28,5 @@ func TestGetFilePathToCAPICRDs(t *testing.T) { _, filename, _, _ := goruntime.Caller(0) //nolint:dogsled // Ignore "declaration has 3 blank identifiers" check. root := path.Join(path.Dir(filename), "..", "..", "..") g := gomega.NewWithT(t) - g.Expect(getFilePathToCAPICRDs(root)).To(gomega.MatchRegexp("(.+)/pkg/mod/sigs.k8s.io/cluster-api@v(.+)/config/crd/bases")) + g.Expect(getFilePathToCAPICRDs(root)).To(gomega.MatchRegexp(`(.+)/pkg/mod/sigs\.k8s\.io/cluster-api@v(.+)/config/crd/bases`)) }