mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 08:57:04 +02:00
45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
---
|
|
# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json
|
|
suite: persistence hostpath
|
|
templates:
|
|
- common.yaml
|
|
tests:
|
|
- it: hostPath should pass
|
|
set:
|
|
persistence:
|
|
hostpathmounts-data:
|
|
enabled: true
|
|
type: hostPath
|
|
hostPath: "/tmp1"
|
|
asserts:
|
|
- documentIndex: 0
|
|
isKind:
|
|
of: Deployment
|
|
- documentIndex: 0
|
|
equal:
|
|
path: spec.template.spec.volumes[0]
|
|
value:
|
|
name: hostpathmounts-data
|
|
hostPath:
|
|
path: /tmp1
|
|
|
|
- it: hostPath with type should pass
|
|
set:
|
|
persistence:
|
|
hostpathmounts-with-type:
|
|
enabled: true
|
|
type: hostPath
|
|
hostPath: "/tmp2"
|
|
hostPathType: "Directory"
|
|
asserts:
|
|
- documentIndex: 0
|
|
isKind:
|
|
of: Deployment
|
|
- documentIndex: 0
|
|
equal:
|
|
path: spec.template.spec.volumes[0]
|
|
value:
|
|
name: hostpathmounts-with-type
|
|
hostPath:
|
|
path: /tmp2
|
|
type: Directory
|