47 lines
1.5 KiB
YAML
47 lines
1.5 KiB
YAML
suite: daemonset validation test
|
|
templates:
|
|
- common.yaml
|
|
release:
|
|
name: test-release-name
|
|
namespace: test-release-namespace
|
|
tests:
|
|
- it: should fail with invalid strategy
|
|
set:
|
|
workload:
|
|
workload-name:
|
|
enabled: true
|
|
primary: true
|
|
type: DaemonSet
|
|
strategy: not-a-strategy
|
|
podSpec: {}
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: DaemonSet - Expected [strategy] to be one of [OnDelete, RollingUpdate], but got [not-a-strategy]
|
|
|
|
- it: should fail with rollingUpdate not a dict
|
|
set:
|
|
workload:
|
|
workload-name:
|
|
enabled: true
|
|
primary: true
|
|
type: DaemonSet
|
|
strategy: RollingUpdate
|
|
rollingUpdate: "not a dict"
|
|
podSpec: {}
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: DaemonSet - Expected [rollingUpdate] to be a dictionary, but got [string]
|
|
|
|
- it: should fail with namespace longer than 63 characters
|
|
set:
|
|
workload:
|
|
workload-name:
|
|
enabled: true
|
|
primary: true
|
|
type: DaemonSet
|
|
namespace: my-extra-super-duper-long-name-that-is-longer-than-63-characters
|
|
podSpec: {}
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: DaemonSet - Namespace [my-extra-super-duper-long-name-that-is-longer-than-63-characters] is not valid. Must start and end with an alphanumeric lowercase character. It can contain '-'. And must be at most 63 characters.
|