expand test a bit

This commit is contained in:
Stavros kois
2022-11-09 13:16:20 +02:00
parent 2e882f314e
commit 9dfb5cae07
3 changed files with 39 additions and 18 deletions

View File

@@ -1,17 +0,0 @@
suite: pod deployment
templates:
- common.yaml
tests:
- it: default values should pass
asserts:
- hasDocuments:
count: 1
- documentIndex: 0
isKind:
of: Deployment
- equal:
path: apiVersion
value: apps/v1
- equal:
path: metadata.name
value: RELEASE-NAME-common-test

View File

@@ -0,0 +1,38 @@
suite: pod deployment
templates:
- common.yaml
tests:
- it: should pass with default values
asserts:
- hasDocuments:
count: 1
- documentIndex: &deploymentDoc 0
isKind:
of: Deployment
- equal:
documentIndex: *deploymentDoc
path: apiVersion
value: apps/v1
- equal:
documentIndex: *deploymentDoc
path: metadata.name
value: RELEASE-NAME-common-test
- it: should pass with nameOverride
set:
nameOverride: overrodeName
asserts:
- equal:
documentIndex: *deploymentDoc
path: metadata.name
value: RELEASE-NAME-overrodeName
- it: should pass with global.nameOverride
set:
nameOverride: overrodeName
global.nameOverride: globalOverrodeName
asserts:
- equal:
documentIndex: *deploymentDoc
path: metadata.name
value: RELEASE-NAME-globalOverrodeName

View File

@@ -59,7 +59,7 @@ Create the "fqdn" + "." + "svc.cluster.local"
{{/*
TODO: See if it's needed
Return the properly cased vresion of the controller type
Return the properly cased version of the controller type
*/}}
{{- define "ix.v1.common.names.controllerType" -}}
{{- if eq (.Values.controller.type | lower) "deployment" -}}