add unit tests for gateway api
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
suite: Test httproute with implicit path defaults
|
||||
templates:
|
||||
- templates/gitea/httproute.yaml
|
||||
tests:
|
||||
- it: should use default path and pathType when no paths are specified
|
||||
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: "/"
|
||||
Reference in New Issue
Block a user