mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 08:57:04 +02:00
fix(common): Release common-4.0.1 (#415)
This commit is contained in:
parent
a01a89cb13
commit
9a478444a4
14 changed files with 163 additions and 15 deletions
|
@ -60,6 +60,30 @@ tests:
|
|||
port: 8080
|
||||
weight: 1
|
||||
|
||||
- it: automatic service and port reference should pass
|
||||
values:
|
||||
- ../_values/service_main_default.yaml
|
||||
set:
|
||||
route.main:
|
||||
parentRefs:
|
||||
- name: parentName
|
||||
namespace: parentNamespace
|
||||
rules:
|
||||
- backendRefs: [{}]
|
||||
documentSelector:
|
||||
path: $[?(@.kind == "HTTPRoute")].metadata.name
|
||||
value: release-name
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.rules[0].backendRefs[0]
|
||||
value:
|
||||
group: ""
|
||||
kind: Service
|
||||
name: release-name
|
||||
namespace: NAMESPACE
|
||||
port: 8081
|
||||
weight: 1
|
||||
|
||||
- it: custom service reference should pass
|
||||
set:
|
||||
route.main:
|
||||
|
|
|
@ -41,3 +41,40 @@ tests:
|
|||
asserts:
|
||||
- failedTemplate:
|
||||
errorMessage: "backend refs and request redirect filters cannot co-exist."
|
||||
|
||||
- it: automatic service determination should fail when no service is enabled
|
||||
set:
|
||||
route.main:
|
||||
parentRefs:
|
||||
- name: parentName
|
||||
namespace: parentNamespace
|
||||
rules:
|
||||
- backendRefs:
|
||||
- port: 8080
|
||||
asserts:
|
||||
- failedTemplate:
|
||||
errorMessage: "Either name or identifier is required because automatic Service detection is not possible. (route: main)"
|
||||
|
||||
- it: automatic service determination should fail when >1 service is enabled
|
||||
set:
|
||||
service:
|
||||
main:
|
||||
controller: main
|
||||
ports:
|
||||
ui:
|
||||
port: 8082
|
||||
second:
|
||||
controller: main
|
||||
ports:
|
||||
ui:
|
||||
port: 8082
|
||||
route.main:
|
||||
parentRefs:
|
||||
- name: parentName
|
||||
namespace: parentNamespace
|
||||
rules:
|
||||
- backendRefs:
|
||||
- port: 8080
|
||||
asserts:
|
||||
- failedTemplate:
|
||||
errorMessage: "Either name or identifier is required because automatic Service detection is not possible. (route: main)"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue