feat: Gateway API support, in lieu of Ingress
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
suite: Test httproute with structured paths
|
||||
templates:
|
||||
- templates/gitea/httproute.yaml
|
||||
tests:
|
||||
- it: should work with a plain string path
|
||||
set:
|
||||
gateway.httpRoute.enabled: true
|
||||
gateway.httpRoute.paths:
|
||||
- /
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 1
|
||||
- isKind:
|
||||
of: HTTPRoute
|
||||
- equal:
|
||||
path: spec.rules[0].matches[0].path.type
|
||||
value: "PathPrefix"
|
||||
- equal:
|
||||
path: spec.rules[0].matches[0].path.value
|
||||
value: "/"
|
||||
|
||||
- it: should work with structured path definitions and per-path pathType
|
||||
set:
|
||||
gateway.httpRoute.enabled: true
|
||||
gateway.httpRoute.paths:
|
||||
- path: /
|
||||
- path: /foo
|
||||
pathType: Exact
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 1
|
||||
- isKind:
|
||||
of: HTTPRoute
|
||||
- equal:
|
||||
path: spec.rules[0].matches[0].path.type
|
||||
value: "PathPrefix"
|
||||
- equal:
|
||||
path: spec.rules[0].matches[0].path.value
|
||||
value: "/"
|
||||
- equal:
|
||||
path: spec.rules[1].matches[0].path.type
|
||||
value: "Exact"
|
||||
- equal:
|
||||
path: spec.rules[1].matches[0].path.value
|
||||
value: "/foo"
|
||||
|
||||
- it: should allow overriding the default pathType
|
||||
set:
|
||||
gateway.httpRoute.enabled: true
|
||||
gateway.httpRoute.pathType: Exact
|
||||
gateway.httpRoute.paths:
|
||||
- /
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.rules[0].matches[0].path.type
|
||||
value: "Exact"
|
||||
Reference in New Issue
Block a user