Skip to content

Commit

Permalink
test(MeshHTTPRoute): tweak path names
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Beaumont <[email protected]>
  • Loading branch information
michaelbeaumont committed Jan 22, 2024
1 parent cfc6e57 commit 3b8eead
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ var _ = Describe("MeshHTTPRoute", func() {
Matches: []api.Match{{
Path: &api.PathMatch{
Type: api.PathPrefix,
Value: "/",
Value: "/wild",
},
}},
Default: api.RuleConf{
Expand All @@ -599,7 +599,7 @@ var _ = Describe("MeshHTTPRoute", func() {
Matches: []api.Match{{
Path: &api.PathMatch{
Type: api.PathPrefix,
Value: "/go",
Value: "/go-dev",
},
}},
Default: api.RuleConf{
Expand All @@ -619,7 +619,7 @@ var _ = Describe("MeshHTTPRoute", func() {
Matches: []api.Match{{
Path: &api.PathMatch{
Type: api.PathPrefix,
Value: "/wild",
Value: "/wild-dev",
},
}},
Default: api.RuleConf{
Expand All @@ -639,7 +639,7 @@ var _ = Describe("MeshHTTPRoute", func() {
Matches: []api.Match{{
Path: &api.PathMatch{
Type: api.PathPrefix,
Value: "/other",
Value: "/other-dev",
},
}},
Default: api.RuleConf{
Expand Down Expand Up @@ -727,7 +727,7 @@ var _ = Describe("MeshHTTPRoute", func() {
Matches: []api.Match{{
Path: &api.PathMatch{
Type: api.PathPrefix,
Value: "/",
Value: "/wild",
},
}},
Default: api.RuleConf{
Expand All @@ -747,7 +747,7 @@ var _ = Describe("MeshHTTPRoute", func() {
Matches: []api.Match{{
Path: &api.PathMatch{
Type: api.PathPrefix,
Value: "/go",
Value: "/go-dev",
},
}},
Default: api.RuleConf{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,20 @@ resources:
name: '*'
routes:
- match:
prefix: /
path: /wild
route:
clusterNotFoundResponseCode: INTERNAL_SERVER_ERROR
idleTimeout: 5s
weightedClusters:
clusters:
- name: backend-26cb64fa4e85e7b7
requestHeadersToAdd:
- header:
key: x-kuma-tags
value: '&kuma.io/service=sample-gateway&'
weight: 100
- match:
prefix: /wild/
route:
clusterNotFoundResponseCode: INTERNAL_SERVER_ERROR
idleTimeout: 5s
Expand All @@ -39,7 +52,7 @@ resources:
name: go.dev
routes:
- match:
path: /go
path: /go-dev
route:
clusterNotFoundResponseCode: INTERNAL_SERVER_ERROR
idleTimeout: 5s
Expand All @@ -52,7 +65,7 @@ resources:
value: '&kuma.io/service=sample-gateway&'
weight: 100
- match:
prefix: /go/
prefix: /go-dev/
route:
clusterNotFoundResponseCode: INTERNAL_SERVER_ERROR
idleTimeout: 5s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,20 @@ resources:
name: other.dev
routes:
- match:
path: /other
path: /other-dev
route:
clusterNotFoundResponseCode: INTERNAL_SERVER_ERROR
idleTimeout: 5s
weightedClusters:
clusters:
- name: backend-26cb64fa4e85e7b7
requestHeadersToAdd:
- header:
key: x-kuma-tags
value: '&kuma.io/service=sample-gateway&'
weight: 100
- match:
path: /wild-dev
route:
clusterNotFoundResponseCode: INTERNAL_SERVER_ERROR
idleTimeout: 5s
Expand All @@ -39,7 +52,7 @@ resources:
value: '&kuma.io/service=sample-gateway&'
weight: 100
- match:
prefix: /other/
prefix: /other-dev/
route:
clusterNotFoundResponseCode: INTERNAL_SERVER_ERROR
idleTimeout: 5s
Expand All @@ -52,7 +65,7 @@ resources:
value: '&kuma.io/service=sample-gateway&'
weight: 100
- match:
prefix: /wild/
prefix: /wild-dev/
route:
clusterNotFoundResponseCode: INTERNAL_SERVER_ERROR
idleTimeout: 5s
Expand All @@ -65,7 +78,7 @@ resources:
value: '&kuma.io/service=sample-gateway&'
weight: 100
- match:
prefix: /
prefix: /wild/
route:
clusterNotFoundResponseCode: INTERNAL_SERVER_ERROR
idleTimeout: 5s
Expand All @@ -82,7 +95,7 @@ resources:
name: go.dev
routes:
- match:
path: /wild
path: /wild-dev
route:
clusterNotFoundResponseCode: INTERNAL_SERVER_ERROR
idleTimeout: 5s
Expand All @@ -95,7 +108,7 @@ resources:
value: '&kuma.io/service=sample-gateway&'
weight: 100
- match:
path: /go
path: /go-dev
route:
clusterNotFoundResponseCode: INTERNAL_SERVER_ERROR
idleTimeout: 5s
Expand All @@ -108,7 +121,7 @@ resources:
value: '&kuma.io/service=sample-gateway&'
weight: 100
- match:
prefix: /wild/
path: /wild
route:
clusterNotFoundResponseCode: INTERNAL_SERVER_ERROR
idleTimeout: 5s
Expand All @@ -121,7 +134,7 @@ resources:
value: '&kuma.io/service=sample-gateway&'
weight: 100
- match:
prefix: /go/
prefix: /wild-dev/
route:
clusterNotFoundResponseCode: INTERNAL_SERVER_ERROR
idleTimeout: 5s
Expand All @@ -134,7 +147,20 @@ resources:
value: '&kuma.io/service=sample-gateway&'
weight: 100
- match:
prefix: /
prefix: /go-dev/
route:
clusterNotFoundResponseCode: INTERNAL_SERVER_ERROR
idleTimeout: 5s
weightedClusters:
clusters:
- name: backend-26cb64fa4e85e7b7
requestHeadersToAdd:
- header:
key: x-kuma-tags
value: '&kuma.io/service=sample-gateway&'
weight: 100
- match:
prefix: /wild/
route:
clusterNotFoundResponseCode: INTERNAL_SERVER_ERROR
idleTimeout: 5s
Expand All @@ -150,6 +176,19 @@ resources:
- '*.dev'
name: '*.dev'
routes:
- match:
path: /wild-dev
route:
clusterNotFoundResponseCode: INTERNAL_SERVER_ERROR
idleTimeout: 5s
weightedClusters:
clusters:
- name: backend-26cb64fa4e85e7b7
requestHeadersToAdd:
- header:
key: x-kuma-tags
value: '&kuma.io/service=sample-gateway&'
weight: 100
- match:
path: /wild
route:
Expand All @@ -164,7 +203,7 @@ resources:
value: '&kuma.io/service=sample-gateway&'
weight: 100
- match:
prefix: /wild/
prefix: /wild-dev/
route:
clusterNotFoundResponseCode: INTERNAL_SERVER_ERROR
idleTimeout: 5s
Expand All @@ -177,7 +216,7 @@ resources:
value: '&kuma.io/service=sample-gateway&'
weight: 100
- match:
prefix: /
prefix: /wild/
route:
clusterNotFoundResponseCode: INTERNAL_SERVER_ERROR
idleTimeout: 5s
Expand All @@ -194,7 +233,20 @@ resources:
name: '*'
routes:
- match:
prefix: /
path: /wild
route:
clusterNotFoundResponseCode: INTERNAL_SERVER_ERROR
idleTimeout: 5s
weightedClusters:
clusters:
- name: backend-26cb64fa4e85e7b7
requestHeadersToAdd:
- header:
key: x-kuma-tags
value: '&kuma.io/service=sample-gateway&'
weight: 100
- match:
prefix: /wild/
route:
clusterNotFoundResponseCode: INTERNAL_SERVER_ERROR
idleTimeout: 5s
Expand All @@ -220,7 +272,7 @@ resources:
name: go.dev
routes:
- match:
path: /wild
path: /wild-dev
route:
clusterNotFoundResponseCode: INTERNAL_SERVER_ERROR
idleTimeout: 5s
Expand All @@ -233,7 +285,7 @@ resources:
value: '&kuma.io/service=sample-gateway&'
weight: 100
- match:
path: /go
path: /go-dev
route:
clusterNotFoundResponseCode: INTERNAL_SERVER_ERROR
idleTimeout: 5s
Expand All @@ -246,7 +298,20 @@ resources:
value: '&kuma.io/service=sample-gateway&'
weight: 100
- match:
prefix: /wild/
path: /wild
route:
clusterNotFoundResponseCode: INTERNAL_SERVER_ERROR
idleTimeout: 5s
weightedClusters:
clusters:
- name: backend-26cb64fa4e85e7b7
requestHeadersToAdd:
- header:
key: x-kuma-tags
value: '&kuma.io/service=sample-gateway&'
weight: 100
- match:
prefix: /wild-dev/
route:
clusterNotFoundResponseCode: INTERNAL_SERVER_ERROR
idleTimeout: 5s
Expand All @@ -259,7 +324,7 @@ resources:
value: '&kuma.io/service=sample-gateway&'
weight: 100
- match:
prefix: /go/
prefix: /go-dev/
route:
clusterNotFoundResponseCode: INTERNAL_SERVER_ERROR
idleTimeout: 5s
Expand All @@ -272,7 +337,7 @@ resources:
value: '&kuma.io/service=sample-gateway&'
weight: 100
- match:
prefix: /
prefix: /wild/
route:
clusterNotFoundResponseCode: INTERNAL_SERVER_ERROR
idleTimeout: 5s
Expand Down

0 comments on commit 3b8eead

Please sign in to comment.