Skip to content

Commit 1d2de25

Browse files
committed
resolve Copilot's comments
1 parent 8b967c1 commit 1d2de25

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

internal/utils/k8s.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func ValidateRemoteAddrs(remoteAddrs []string) error {
5252
var hostDef = "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"
5353
var hostDefRegex = regexp.MustCompile(hostDef)
5454

55-
// MatchHostDef checks that host matches host's shcema
55+
// MatchHostDef checks that host matches host's schema
5656
// ref to : https://github.com/apache/apisix/blob/c5fc10d9355a0c177a7532f01c77745ff0639a7f/apisix/schema_def.lua#L40
5757
// ref to : https://github.com/kubernetes/kubernetes/blob/976a940f4a4e84fe814583848f97b9aafcdb083f/staging/src/k8s.io/apimachinery/pkg/util/validation/validation.go#L205
5858
// They define regex differently, but k8s's dns is more accurate

test/e2e/apisix/route.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ spec:
358358
}
359359
Eventually(request).WithArguments("/get").WithTimeout(8 * time.Second).ProbeEvery(time.Second).Should(Equal(http.StatusServiceUnavailable))
360360

361-
By("verify that ApisixUpstream reference a Service which is ExternalName should reqeust OK")
361+
By("verify that ApisixUpstream reference a Service which is ExternalName should request OK")
362362
err = s.CreateResourceFromString(apisixUpstreamSpec1)
363363
Expect(err).ShouldNot(HaveOccurred(), "update apisixUpstream")
364364
Eventually(request).WithArguments("/get").WithTimeout(8 * time.Second).ProbeEvery(time.Second).Should(Equal(http.StatusOK))

0 commit comments

Comments
 (0)