Skip to content

Commit

Permalink
remove the base route name in hosts (#2441)
Browse files Browse the repository at this point in the history
  • Loading branch information
lichuqiang authored and knative-prow-robot committed Nov 9, 2018
1 parent 1036f34 commit f69d5ef
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ var (
"test-route.test-ns.svc.cluster.local",
"test-route.test-ns.svc",
"test-route.test-ns",
"test-route",
},
HTTP: &v1alpha1.HTTPClusterIngressRuleValue{
Paths: []v1alpha1.HTTPClusterIngressPath{{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ func TestMakeVirtualServiceSpec_CorrectRoutes(t *testing.T) {
"test-route.test-ns.svc.cluster.local",
"test-route.test-ns.svc",
"test-route.test-ns",
"test-route",
},
HTTP: &v1alpha1.HTTPClusterIngressRuleValue{
Paths: []v1alpha1.HTTPClusterIngressPath{{
Expand Down Expand Up @@ -132,9 +131,6 @@ func TestMakeVirtualServiceSpec_CorrectRoutes(t *testing.T) {
}, {
Uri: &istiov1alpha1.StringMatch{Regex: "^/pets/(.*?)?"},
Authority: &istiov1alpha1.StringMatch{Exact: "test-route.test-ns"},
}, {
Uri: &istiov1alpha1.StringMatch{Regex: "^/pets/(.*?)?"},
Authority: &istiov1alpha1.StringMatch{Exact: "test-route"},
}},
Route: []v1alpha3.DestinationWeight{{
Destination: v1alpha3.Destination{
Expand Down
1 change: 0 additions & 1 deletion pkg/reconciler/v1alpha1/route/resources/cluster_ingress.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ func getRouteDomains(targetName string, r *servingv1alpha1.Route, domain string)
names.K8sServiceFullname(r),
fmt.Sprintf("%s.%s.svc", r.Name, r.Namespace),
fmt.Sprintf("%s.%s", r.Name, r.Namespace),
r.Name,
}
return dedup(domains)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ func TestMakeClusterIngressSpec_CorrectRules(t *testing.T) {
"test-route.test-ns.svc.cluster.local",
"test-route.test-ns.svc",
"test-route.test-ns",
"test-route",
},
HTTP: &netv1alpha1.HTTPClusterIngressRuleValue{
Paths: []netv1alpha1.HTTPClusterIngressPath{{
Expand Down Expand Up @@ -146,7 +145,6 @@ func TestGetRouteDomains_NamelessTarget(t *testing.T) {
"test-route.test-ns.svc.cluster.local",
"test-route.test-ns.svc",
"test-route.test-ns",
"test-route",
}
domains := getRouteDomains("", r, base)
if diff := cmp.Diff(expected, domains); diff != "" {
Expand Down
5 changes: 0 additions & 5 deletions pkg/reconciler/v1alpha1/route/route_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,6 @@ func TestCreateRouteForOneReserveRevision(t *testing.T) {
"test-route.test.svc.cluster.local",
"test-route.test.svc",
"test-route.test",
"test-route",
},
HTTP: &netv1alpha1.HTTPClusterIngressRuleValue{
Paths: []netv1alpha1.HTTPClusterIngressPath{{
Expand Down Expand Up @@ -416,7 +415,6 @@ func TestCreateRouteWithMultipleTargets(t *testing.T) {
"test-route.test.svc.cluster.local",
"test-route.test.svc",
"test-route.test",
"test-route",
},
HTTP: &netv1alpha1.HTTPClusterIngressRuleValue{
Paths: []netv1alpha1.HTTPClusterIngressPath{{
Expand Down Expand Up @@ -499,7 +497,6 @@ func TestCreateRouteWithOneTargetReserve(t *testing.T) {
"test-route.test.svc.cluster.local",
"test-route.test.svc",
"test-route.test",
"test-route",
},
HTTP: &netv1alpha1.HTTPClusterIngressRuleValue{
Paths: []netv1alpha1.HTTPClusterIngressPath{{
Expand Down Expand Up @@ -599,7 +596,6 @@ func TestCreateRouteWithDuplicateTargets(t *testing.T) {
"test-route.test.svc.cluster.local",
"test-route.test.svc",
"test-route.test",
"test-route",
},
HTTP: &netv1alpha1.HTTPClusterIngressRuleValue{
Paths: []netv1alpha1.HTTPClusterIngressPath{{
Expand Down Expand Up @@ -719,7 +715,6 @@ func TestCreateRouteWithNamedTargets(t *testing.T) {
"test-route.test.svc.cluster.local",
"test-route.test.svc",
"test-route.test",
"test-route",
},
HTTP: &netv1alpha1.HTTPClusterIngressRuleValue{
Paths: []netv1alpha1.HTTPClusterIngressPath{{
Expand Down

0 comments on commit f69d5ef

Please sign in to comment.