Files
helm-gitea/unittests/helm/httproute/structured-paths.yaml
T
williamp 84349e6385
check-and-test / check-and-test (pull_request) Successful in 39s
feat(new): gateway api support
2026-07-04 12:30:38 -04:00

57 lines
1.4 KiB
YAML

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"