mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 08:57:04 +02:00
feat(common): Release version 2.0.0-beta.1 (#173)
This commit is contained in:
parent
19767d668c
commit
7b6ee00be6
189 changed files with 3110 additions and 3023 deletions
99
charts/library/common-test/tests/service/values_test.yaml
Normal file
99
charts/library/common-test/tests/service/values_test.yaml
Normal file
|
@ -0,0 +1,99 @@
|
|||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json
|
||||
suite: service values
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: ports and services are enabled by default
|
||||
set:
|
||||
service:
|
||||
second:
|
||||
type: ClusterIP
|
||||
controller: main
|
||||
ports:
|
||||
first:
|
||||
port: 80
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &FirstServiceDocument 1
|
||||
isKind:
|
||||
of: Service
|
||||
- documentIndex: &SecondServiceDocument 2
|
||||
isKind:
|
||||
of: Service
|
||||
- documentIndex: *FirstServiceDocument
|
||||
notExists:
|
||||
path: spec.allocateLoadBalancerNodePorts
|
||||
|
||||
- it: services can be disabled
|
||||
set:
|
||||
service:
|
||||
main:
|
||||
enabled: false
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 1
|
||||
- documentIndex: &DeploymentDocument 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
|
||||
- it: externalTrafficPolicy should pass for NodePort service
|
||||
set:
|
||||
service:
|
||||
main:
|
||||
type: NodePort
|
||||
externalTrafficPolicy: Local
|
||||
asserts:
|
||||
- documentIndex: &ServiceDocument 1
|
||||
isKind:
|
||||
of: Service
|
||||
- documentIndex: *ServiceDocument
|
||||
equal:
|
||||
path: spec.externalTrafficPolicy
|
||||
value: Local
|
||||
|
||||
- it: externalTrafficPolicy should pass for LoadBalancer service
|
||||
set:
|
||||
service:
|
||||
main:
|
||||
type: LoadBalancer
|
||||
externalTrafficPolicy: Local
|
||||
asserts:
|
||||
- documentIndex: &ServiceDocument 1
|
||||
isKind:
|
||||
of: Service
|
||||
- documentIndex: *ServiceDocument
|
||||
equal:
|
||||
path: spec.externalTrafficPolicy
|
||||
value: Local
|
||||
|
||||
- it: allocateLoadBalancerNodePorts can be set to true
|
||||
set:
|
||||
service:
|
||||
main:
|
||||
type: LoadBalancer
|
||||
allocateLoadBalancerNodePorts: true
|
||||
asserts:
|
||||
- documentIndex: &ServiceDocument 1
|
||||
isKind:
|
||||
of: Service
|
||||
- documentIndex: *ServiceDocument
|
||||
equal:
|
||||
path: spec.allocateLoadBalancerNodePorts
|
||||
value: true
|
||||
|
||||
- it: allocateLoadBalancerNodePorts can be set to false
|
||||
set:
|
||||
service:
|
||||
main:
|
||||
type: LoadBalancer
|
||||
allocateLoadBalancerNodePorts: false
|
||||
asserts:
|
||||
- documentIndex: &ServiceDocument 1
|
||||
isKind:
|
||||
of: Service
|
||||
- documentIndex: *ServiceDocument
|
||||
equal:
|
||||
path: spec.allocateLoadBalancerNodePorts
|
||||
value: false
|
Loading…
Add table
Add a link
Reference in a new issue