mirror of
https://github.com/truenas/charts.git
synced 2026-06-17 07:27:44 +08:00
expand test a bit
This commit is contained in:
@@ -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
|
||||
38
library/common-test/tests/pods/deployment-test.yaml
Normal file
38
library/common-test/tests/pods/deployment-test.yaml
Normal 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
|
||||
@@ -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" -}}
|
||||
|
||||
Reference in New Issue
Block a user