feat(common): Release v2.4.0 (#245)

Signed-off-by: Christopher Larivière <lariviere.c@gmail.com>
Co-authored-by: Christopher Larivière <lariviere.c@gmail.com>
Co-authored-by: Markus Reiter <me@reitermark.us>
This commit is contained in:
Bernd Schorgers 2023-12-10 09:56:08 +01:00 committed by GitHub
parent 44b1665b61
commit 3d3028b889
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 364 additions and 61 deletions

View file

@ -1,6 +1,6 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json
suite: ingress service reference
suite: route service reference
templates:
- common.yaml
tests:
@ -11,6 +11,14 @@ tests:
parentRefs:
- name: parentName
namespace: parentNamespace
rules:
- backendRefs:
- group: ""
kind: Service
name: RELEASE-NAME
namespace: NAMESPACE
port: 8080
weight: 1
asserts:
- documentIndex: &HTTPRouteDocument 2
isKind:
@ -54,3 +62,55 @@ tests:
namespace: serviceNamespace
port: 1234
weight: 123
- it: custom service reference with filter should fail
set:
route.main:
enabled: true
parentRefs:
- name: parentName
namespace: parentNamespace
rules:
- backendRefs:
- group: test
name: pathService
port: 1234
namespace: serviceNamespace
weight: 123
filters:
- type: RequestRedirect
requestRedirect:
scheme: https
statusCode: 301
asserts:
- failedTemplate:
errorMessage: "backend refs and request redirect filters cannot co-exist."
- it: custom service with filter should pass
set:
route.main:
enabled: true
parentRefs:
- name: parentName
namespace: parentNamespace
rules:
- filters:
- type: RequestRedirect
requestRedirect:
scheme: https
statusCode: 301
asserts:
- documentIndex: &HTTPRouteDocument 2
isKind:
of: HTTPRoute
- documentIndex: *HTTPRouteDocument
equal:
path: spec.rules[0].filters[0]
value:
type: RequestRedirect
requestRedirect:
scheme: https
statusCode: 301
- documentIndex: *HTTPRouteDocument
notExists:
path: spec.rules[0].backendRefs[0]