Skip to content

Commit

Permalink
Merge pull request #4189 from k8s-infra-cherrypick-robot/cherry-pick-…
Browse files Browse the repository at this point in the history
…4185-to-release-1.11

[release-1.11] Escape dots in hostname regexps
  • Loading branch information
k8s-ci-robot authored Oct 26, 2023
2 parents ea6739f + 4fb7b6a commit aef2f77
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/test/env/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ var (
logger = record.NewLogger(record.WithThreshold(ptr.To(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() {
Expand Down
2 changes: 1 addition & 1 deletion internal/test/env/env_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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`))
}

0 comments on commit aef2f77

Please sign in to comment.