-
Notifications
You must be signed in to change notification settings - Fork 2
fix: HTTPRouteHostnameIntersection test case #135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: ashing <[email protected]>
Signed-off-by: ashing <[email protected]>
Signed-off-by: ashing <[email protected]>
Signed-off-by: ashing <[email protected]>
conformance test reportapiVersion: gateway.networking.k8s.io/v1
date: "2025-05-13T02:54:42Z"
gatewayAPIChannel: standard
gatewayAPIVersion: v1.2.0
implementation:
contact: null
organization: APISIX
project: apisix-ingress-controller
url: https://github.com/apache/apisix-ingress-controller.git
version: v2.0.0
kind: ConformanceReport
mode: default
profiles:
- core:
failedTests:
- HTTPRouteListenerHostnameMatching
result: failure
skippedTests:
- GatewayInvalidTLSConfiguration
- GatewaySecretInvalidReferenceGrant
- GatewaySecretMissingReferenceGrant
- HTTPRouteHTTPSListener
- HTTPRouteInvalidCrossNamespaceBackendRef
- HTTPRouteInvalidCrossNamespaceParentRef
- HTTPRouteInvalidNonExistentBackendRef
- HTTPRouteInvalidParentRefNotMatchingSectionName
- HTTPRouteInvalidReferenceGrant
- HTTPRoutePartiallyInvalidViaInvalidReferenceGrant
- HTTPRouteReferenceGrant
statistics:
Failed: 1
Passed: 21
Skipped: 11
name: GATEWAY-HTTP
summary: Core tests failed with 1 test failures. |
| reason := gatewayv1.RouteReasonAccepted | ||
| if message == ErrNoMatchingListenerHostname.Error() { | ||
| reason = gatewayv1.RouteReasonNoMatchingListenerHostname | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
靠 message 来传递 reason 有点怪怪的,是否可以定义一种 error 类型,比如
type ReasonErr struct {
Reason string
Message string
}
func (e ReasonErr) Error() string { return e.Message }在前文相关函数中直接返回这样类型的错误,后文中用 errors.As 来判断错误类型,如果是 ReasonErr,可以取出 Reson。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, but let's wait for the next PR to make a unified adjustment.
test/conformance/conformance_test.go
Outdated
| // tests.HTTPRouteHostnameIntersection.ShortName, | ||
| // tests.HTTPRouteListenerHostnameMatching.ShortName, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be deleted
Signed-off-by: ashing <[email protected]>
Signed-off-by: ashing [email protected]
Type of change:
What this PR does / why we need it:
Pre-submission checklist: