Skip to content

Commit

Permalink
Fix failed build for knativeLocalGatewayService
Browse files Browse the repository at this point in the history
  • Loading branch information
yuzisun committed Aug 17, 2024
1 parent 61b5e7e commit fbf939a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 26 deletions.
14 changes: 0 additions & 14 deletions pkg/apis/serving/v1beta1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -787,15 +787,15 @@ func TestCreateVirtualService(t *testing.T) {
}, {
name: "found predictor status with the additional ingress domains with duplication",
ingressConfig: &v1beta1.IngressConfig{
IngressGateway: constants.KnativeIngressGateway,
IngressServiceName: "someIngressServiceName",
LocalGateway: constants.KnativeLocalGateway,
LocalGatewayServiceName: "knative-local-gateway.istio-system.svc.cluster.local",
UrlScheme: "http",
IngressDomain: "my-domain.com",
AdditionalIngressDomains: &[]string{"example.com", additionalDomain, additionalSecondDomain, additionalDomain},
PathTemplate: "/serving/{{ .Namespace }}/{{ .Name }}",
DisableIstioVirtualHost: false,
IngressGateway: constants.KnativeIngressGateway,
KnativeLocalGatewayService: knativeLocalGatewayService,
LocalGateway: constants.KnativeLocalGateway,
LocalGatewayServiceName: "knative-local-gateway.istio-system.svc.cluster.local",
UrlScheme: "http",
IngressDomain: "my-domain.com",
AdditionalIngressDomains: &[]string{"example.com", additionalDomain, additionalSecondDomain, additionalDomain},
PathTemplate: "/serving/{{ .Namespace }}/{{ .Name }}",
DisableIstioVirtualHost: false,
},
domainList: &[]string{"my-domain-1.com", "example.com"},
useDefault: false,
Expand Down Expand Up @@ -867,8 +867,9 @@ func TestCreateVirtualService(t *testing.T) {
},
Route: []*istiov1beta1.HTTPRouteDestination{
{
Destination: &istiov1beta1.Destination{Host: constants.LocalGatewayHost, Port: &istiov1beta1.PortSelector{Number: constants.CommonDefaultHttpPort}},
Weight: 100,
Destination: &istiov1beta1.Destination{Host: knativeLocalGatewayService,
Port: &istiov1beta1.PortSelector{Number: constants.CommonDefaultHttpPort}},
Weight: 100,
},
},
Headers: &istiov1beta1.Headers{
Expand Down Expand Up @@ -909,7 +910,7 @@ func TestCreateVirtualService(t *testing.T) {
Uri: "/",
},
Route: []*istiov1beta1.HTTPRouteDestination{
createHTTPRouteDestination("knative-local-gateway.istio-system.svc.cluster.local"),
createHTTPRouteDestination(knativeLocalGatewayService),
},
Headers: &istiov1beta1.Headers{
Request: &istiov1beta1.Headers_HeaderOperations{
Expand Down Expand Up @@ -1290,6 +1291,7 @@ func TestCreateVirtualService(t *testing.T) {

actualService := createIngress(testIsvc, tc.useDefault, tc.ingressConfig, tc.domainList)
if diff := cmp.Diff(tc.expectedService.DeepCopy(), actualService.DeepCopy(), protocmp.Transform()); diff != "" {
t.Errorf("Test %q unexpected status actual: %v", tc.name, actualService)
t.Errorf("Test %q unexpected status (-want +got): %v", tc.name, diff)
}
})
Expand Down

0 comments on commit fbf939a

Please sign in to comment.