fails does not care about document index

This commit is contained in:
Stavros kois
2022-11-22 19:55:59 +02:00
parent 5ef05876f2
commit aaba013d79
17 changed files with 0 additions and 88 deletions

View File

@@ -9,7 +9,6 @@ tests:
of: Deployment
- it: should fail with envFrom configMapRef has empty name
documentIndex: *deploymentDoc
set:
envFrom:
- configMapRef:
@@ -19,7 +18,6 @@ tests:
errorMessage: Name is required for configMapRef in envFrom.
- it: should fail with envFrom secretRef has empty name
documentIndex: *deploymentDoc
set:
envFrom:
- secretRef:
@@ -29,7 +27,6 @@ tests:
errorMessage: Name is required for secretRef in envFrom.
- it: should fail with envFrom secretRef has missing name
documentIndex: *deploymentDoc
set:
envFrom:
- secretRef:
@@ -38,7 +35,6 @@ tests:
errorMessage: Not valid Ref or <name> key is missing in envFrom.
- it: should fail with envFrom configMapRef has missing name
documentIndex: *deploymentDoc
set:
envFrom:
- configMapRef:

View File

@@ -9,7 +9,6 @@ tests:
of: Deployment
- it: should fail with envList missing name
documentIndex: *deploymentDoc
set:
envList:
- value: some_value
@@ -18,7 +17,6 @@ tests:
errorMessage: Please specify both name and value for environment variable
- it: should fail with envList missing value
documentIndex: *deploymentDoc
set:
envList:
- name: some_name
@@ -27,7 +25,6 @@ tests:
errorMessage: Please specify both name and value for environment variable
- it: should fail with envList name as a map
documentIndex: *deploymentDoc
set:
envList:
- name:
@@ -38,7 +35,6 @@ tests:
errorMessage: Name in envList cannot be a map or slice
- it: should fail with envList name as a slice
documentIndex: *deploymentDoc
set:
envList:
- name:
@@ -49,7 +45,6 @@ tests:
errorMessage: Name in envList cannot be a map or slice
- it: should fail with envList value as a map
documentIndex: *deploymentDoc
set:
envList:
- name: some_name
@@ -60,7 +55,6 @@ tests:
errorMessage: Value in envList cannot be a map or slice
- it: should fail with envList value as a slice
documentIndex: *deploymentDoc
set:
envList:
- name: some_name

View File

@@ -9,7 +9,6 @@ tests:
of: Deployment
- it: should fail with envs defined as a list
documentIndex: *deploymentDoc
set:
env:
- name: some_name
@@ -19,7 +18,6 @@ tests:
errorMessage: Environment Variables as a list is not supported. Use key-value format.
- it: should fail with envs defined with an invalid keyRef
documentIndex: *deploymentDoc
set:
env:
ENVVAR:
@@ -31,7 +29,6 @@ tests:
errorMessage: Not a valid valueFrom reference. Valid options are (configMapKeyRef and secretKeyRef)
- it: should fail with envs defined without a name in configMapKeyRef
documentIndex: *deploymentDoc
set:
env:
ENVVAR:
@@ -42,7 +39,6 @@ tests:
errorMessage: <name> for the keyRef is not defined in (ENVVAR)
- it: should fail with envs defined without a name in secretKeyRef
documentIndex: *deploymentDoc
set:
env:
ENVVAR:
@@ -53,7 +49,6 @@ tests:
errorMessage: <name> for the keyRef is not defined in (ENVVAR)
- it: should fail with envs defined without a key in configMapKeyRef
documentIndex: *deploymentDoc
set:
env:
ENVVAR:
@@ -64,7 +59,6 @@ tests:
errorMessage: <key> for the keyRef is not defined in (ENVVAR)
- it: should fail with envs defined without a key in secretKeyRef
documentIndex: *deploymentDoc
set:
env:
ENVVAR:
@@ -75,7 +69,6 @@ tests:
errorMessage: <key> for the keyRef is not defined in (ENVVAR)
- it: should fail with envs defined with a non-bool <optional> in secretKeyRef
documentIndex: *deploymentDoc
set:
env:
ENVVAR:
@@ -88,7 +81,6 @@ tests:
errorMessage: <optional> in secretKeyRef must be a boolean on Environment Variable (ENVVAR)
- it: should fail with envs defined with valueFrom key
documentIndex: *deploymentDoc
set:
env:
ENVVAR:
@@ -102,7 +94,6 @@ tests:
errorMessage: Please remove <valueFrom> and use directly configMapKeyRef or secretKeyRef
- it: should fail with envs defined with optional in configMapKeyRef
documentIndex: *deploymentDoc
set:
env:
ENVVAR:

View File

@@ -31,7 +31,6 @@ tests:
value: some_repo:some_tag
- it: should fail without repository
documentIndex: *deploymentDoc
set:
image:
repository: ""
@@ -41,7 +40,6 @@ tests:
errorMessage: Image <repository> is required
- it: should fail without tag
documentIndex: *deploymentDoc
set:
image:
repository: some_repo
@@ -63,7 +61,6 @@ tests:
value: some_other_repo:some_other_tag
- it: should pass without repo from image selector
documentIndex: *deploymentDoc
set:
betaImage:
repository: ""
@@ -74,7 +71,6 @@ tests:
errorMessage: Image <repository> is required
- it: should pass without tag from image selector
documentIndex: *deploymentDoc
set:
betaImage:
repository: some_other_repo

View File

@@ -147,7 +147,6 @@ tests:
- some_value
- it: should fail with no command in preStop
documentIndex: *deploymentDoc
set:
lifecycle:
preStop:
@@ -157,7 +156,6 @@ tests:
errorMessage: No commands were given for preStop lifecycle hook
- it: should fail with no command in postStart
documentIndex: *deploymentDoc
set:
lifecycle:
postStart:
@@ -167,7 +165,6 @@ tests:
errorMessage: No commands were given for postStart lifecycle hook
- it: should fail with no command in preStop
documentIndex: *deploymentDoc
set:
lifecycle:
preStop:
@@ -177,7 +174,6 @@ tests:
errorMessage: No commands were given for preStop lifecycle hook
- it: should fail with no command in postStart
documentIndex: *deploymentDoc
set:
lifecycle:
postStart:

View File

@@ -11,7 +11,6 @@ tests:
of: Deployment
- it: should fail with named port
documentIndex: *deploymentDoc
set:
service:
main:
@@ -24,7 +23,6 @@ tests:
errorMessage: This common library does not support named ports for targetPort. port name (main), targetPort (some_name)
- it: should fail without port
documentIndex: *deploymentDoc
set:
service:
main:
@@ -36,7 +34,6 @@ tests:
errorMessage: Port is required on enabled services. Service (main)
- it: should fail with disabled port on enabled service
documentIndex: *deploymentDoc
set:
service:
main:
@@ -48,7 +45,6 @@ tests:
errorMessage: No ports are enabled for the service (main)
- it: should fail with invalid protocol
documentIndex: *deploymentDoc
set:
service:
main:

View File

@@ -41,7 +41,6 @@ tests:
periodSeconds: 5
- it: should fail with wrong probe name
documentIndex: *deploymentDoc
set:
probes:
invalid_probe_name:
@@ -50,7 +49,6 @@ tests:
errorMessage: Invalid probe name (invalid_probe_name). Valid options are (liveness, readiness, startup)
- it: should fail without commands on exec probe
documentIndex: *deploymentDoc
set:
probes:
liveness:
@@ -60,7 +58,6 @@ tests:
errorMessage: No commands were defined for exec type on probe (liveness)
- it: should fail without path on http(s) liveness probe
documentIndex: *deploymentDoc
set:
probes:
liveness:
@@ -70,7 +67,6 @@ tests:
errorMessage: <path> must be defined for HTTP/HTTPS probe types in probe (liveness)
- it: should fail without path on http(s) readiness probe
documentIndex: *deploymentDoc
set:
probes:
readiness:
@@ -80,7 +76,6 @@ tests:
errorMessage: <path> must be defined for HTTP/HTTPS probe types in probe (readiness)
- it: should fail without path on http(s) startup probe
documentIndex: *deploymentDoc
set:
probes:
startup:
@@ -90,7 +85,6 @@ tests:
errorMessage: <path> must be defined for HTTP/HTTPS probe types in probe (startup)
- it: should fail without initialDelaySeconds on non-custom probes
documentIndex: *deploymentDoc
set:
probes:
liveness:
@@ -101,7 +95,6 @@ tests:
errorMessage: <initialDelaySeconds> cannot be empty in probe (liveness)
- it: should fail without failureThreshold on non-custom probes
documentIndex: *deploymentDoc
set:
probes:
liveness:
@@ -112,7 +105,6 @@ tests:
errorMessage: <failureThreshold> cannot be empty in probe (liveness)
- it: should fail without timeoutSeconds on non-custom probes
documentIndex: *deploymentDoc
set:
probes:
liveness:
@@ -123,7 +115,6 @@ tests:
errorMessage: <timeoutSeconds> cannot be empty in probe (liveness)
- it: should fail without periodSeconds on non-custom probes
documentIndex: *deploymentDoc
set:
probes:
liveness:
@@ -134,7 +125,6 @@ tests:
errorMessage: <periodSeconds> cannot be empty in probe (liveness)
- it: should fail when non-custom probe is defined in a disabled service
documentIndex: *deploymentDoc
set:
service:
main:
@@ -148,7 +138,6 @@ tests:
errorMessage: Only custom probes are allowed when service is disabled (liveness)
- it: should fail with invalid probe type
documentIndex: *deploymentDoc
set:
probes:
liveness:
@@ -158,7 +147,6 @@ tests:
errorMessage: Invalid probe type (not_valid_type) on probe (liveness)
- it: should fail with httpHeader value is defined as list
documentIndex: *deploymentDoc
set:
probes:
liveness:
@@ -172,7 +160,6 @@ tests:
errorMessage: Lists or Dicts are not allowed in httpHeaders on probe (liveness)
- it: should fail with httpHeader value is defined as dict
documentIndex: *deploymentDoc
set:
probes:
liveness:

View File

@@ -61,7 +61,6 @@ tests:
runAsNonRoot: true
- it: should fail with securityContext changed, runAsNonRoot true and runAsUser 0
documentIndex: *deploymentDoc
set:
securityContext:
runAsNonRoot: true
@@ -72,7 +71,6 @@ tests:
errorMessage: You are trying to run as root (user or group), but runAsNonRoot is set to true
- it: should fail with securityContext changed, runAsNonRoot true and runAsGroup 0
documentIndex: *deploymentDoc
set:
securityContext:
runAsNonRoot: true
@@ -83,7 +81,6 @@ tests:
errorMessage: You are trying to run as root (user or group), but runAsNonRoot is set to true
- it: should fail with securityContext changed and runAsNonRoot set to a non-bool value
documentIndex: *deploymentDoc
set:
securityContext:
runAsNonRoot: non-bool
@@ -92,7 +89,6 @@ tests:
errorMessage: One or more of the following are not set as booleans (runAsNonRoot, privileged, readOnlyRootFilesystem, allowPrivilegeEscalation)
- it: should fail with securityContext changed and privileged set to a non-bool value
documentIndex: *deploymentDoc
set:
securityContext:
privileged: non-bool
@@ -101,7 +97,6 @@ tests:
errorMessage: One or more of the following are not set as booleans (runAsNonRoot, privileged, readOnlyRootFilesystem, allowPrivilegeEscalation)
- it: should fail with securityContext changed and readOnlyRootFilesystem set to a non-bool value
documentIndex: *deploymentDoc
set:
securityContext:
readOnlyRootFilesystem: non-bool
@@ -110,7 +105,6 @@ tests:
errorMessage: One or more of the following are not set as booleans (runAsNonRoot, privileged, readOnlyRootFilesystem, allowPrivilegeEscalation)
- it: should fail with securityContext changed and allowPrivilegeEscalation set to a non-bool value
documentIndex: *deploymentDoc
set:
securityContext:
allowPrivilegeEscalation: non-bool
@@ -119,7 +113,6 @@ tests:
errorMessage: One or more of the following are not set as booleans (runAsNonRoot, privileged, readOnlyRootFilesystem, allowPrivilegeEscalation)
- it: should fail with securityContext changed and capabilities.add is not a list
documentIndex: *deploymentDoc
set:
securityContext:
capabilities:
@@ -129,7 +122,6 @@ tests:
errorMessage: Either <add> or <drop> capabilities is not a list.
- it: should fail with securityContext changed and capabilities.drop is not a list
documentIndex: *deploymentDoc
set:
securityContext:
capabilities:

View File

@@ -70,7 +70,6 @@ tests:
value: FallbackToLogsOnError
- it: should fail with invalid terminationMessagePolicy
documentIndex: *deploymentDoc
set:
some_key: invalid
termination:

View File

@@ -11,7 +11,6 @@ tests:
path: spec.template.spec.containers[0].volumeMounts
- it: should fail with no mountPath set
documentIndex: *deploymentDoc
set:
persistence:
vol1:

View File

@@ -62,7 +62,6 @@ tests:
path: spec.strategy.rollingUpdate
- it: should fail with wrong controller
documentIndex: *deploymentDoc
set:
controller:
type: not_valid_controller
@@ -71,7 +70,6 @@ tests:
errorMessage: Not a valid controller.type (not_valid_controller)
- it: should fail with wrong strategy
documentIndex: *deploymentDoc
set:
controller:
strategy: not_valid_strategy

View File

@@ -47,7 +47,6 @@ tests:
value: true
- it: should fail with invalid dnsPolicy
documentIndex: *deploymentDoc
set:
dnsPolicy: invalid
asserts:
@@ -83,7 +82,6 @@ tests:
value: Default
- it: should fail with more than 3 nameservers
documentIndex: *deploymentDoc
set:
dnsConfig:
nameservers:
@@ -96,7 +94,6 @@ tests:
errorMessage: There can be at most 3 nameservers specified in dnsConfig
- it: should fail with more than 6 domain searches
documentIndex: *deploymentDoc
set:
dnsConfig:
searches:
@@ -112,7 +109,6 @@ tests:
errorMessage: There can be at most 6 search domains specified in dnsConfig
- it: should fail with no nameservers and dnsPolicy set to None
documentIndex: *deploymentDoc
set:
dnsPolicy: None
asserts:
@@ -250,7 +246,6 @@ tests:
- name: edns0
- it: should fail without ip in hostAliases
documentIndex: *deploymentDoc
set:
hostAliases:
- hostnames:
@@ -260,7 +255,6 @@ tests:
errorMessage: <ip> field is required in hostAliases
- it: should fail without hostnames in hostAliases
documentIndex: *deploymentDoc
set:
hostAliases:
- ip: 1.1.1.1

View File

@@ -37,7 +37,6 @@ tests:
- 1000
- it: should fail without runAsUser
documentIndex: *deploymentDoc
set:
podSecurityContext:
runAsUser:
@@ -46,7 +45,6 @@ tests:
errorMessage: <runAsUser> value is required.
- it: should fail without runAsGroup
documentIndex: *deploymentDoc
set:
podSecurityContext:
runAsGroup:
@@ -55,7 +53,6 @@ tests:
errorMessage: <runAsGroup> value is required.
- it: should fail without fsGroup
documentIndex: *deploymentDoc
set:
podSecurityContext:
fsGroup:
@@ -64,7 +61,6 @@ tests:
errorMessage: <fsGroup> value is required.
- it: should fail with invalid fsGroupChangePolicy
documentIndex: *deploymentDoc
set:
podSecurityContext:
fsGroupChangePolicy: invalid_policy

View File

@@ -58,7 +58,6 @@ tests:
value: some_priority_class_name
- it: should fail with no value in a key in nodeSelector
documentIndex: *deploymentDoc
set:
nodeSelector:
diskType:
@@ -95,7 +94,6 @@ tests:
cpuType: intel
- it: should fail with invalid operator in tolerations
documentIndex: *deploymentDoc
set:
tolerations:
- operator: invalid_op
@@ -104,7 +102,6 @@ tests:
errorMessage: Invalid <operator>. Valid options are Exists, Equal.
- it: should fail with invalid effect in tolerations
documentIndex: *deploymentDoc
set:
tolerations:
- effect: invalid_effect
@@ -114,7 +111,6 @@ tests:
errorMessage: Invalid <effect>. Valid options are NoExecute, NoSchedule, PreferNoSchedule
- it: should fail with empty key and operator Equal in tolerations
documentIndex: *deploymentDoc
set:
tolerations:
- key: ""
@@ -124,7 +120,6 @@ tests:
errorMessage: <key> is required when <operator> is set to <Equal>
- it: should fail with operator Exists and defined value in tolerations
documentIndex: *deploymentDoc
set:
tolerations:
- value: something
@@ -134,7 +129,6 @@ tests:
errorMessage: When <operator> is set to <Exists>, you cannot define a <value>
- it: should fail with operator Exists and non-integer tolerationSeconds in tolerations
documentIndex: *deploymentDoc
set:
tolerations:
- tolerationSeconds: not_an_int

View File

@@ -100,7 +100,6 @@ tests:
medium: Memory
- it: should fail with added emptyDir and non Memory medium
documentIndex: *deploymentDoc
set:
persistence:
volume1:
@@ -169,7 +168,6 @@ tests:
type: Directory
- it: should fail with wrong persistence type
documentIndex: *deploymentDoc
set:
persistence:
some_volume:
@@ -181,7 +179,6 @@ tests:
errorMessage: Not a valid persistence.type (not_valid_persistence)
- it: should fail with not set objectName on configMaps
documentIndex: *deploymentDoc
set:
persistence:
some_volume:
@@ -193,7 +190,6 @@ tests:
errorMessage: objectName not set for persistence item some_volume
- it: should fail with not set objectName on secrets
documentIndex: *deploymentDoc
set:
persistence:
some_volume:
@@ -205,7 +201,6 @@ tests:
errorMessage: objectName not set for persistence item some_volume
- it: should fail with not set path on hostPath
documentIndex: *deploymentDoc
set:
persistence:
some_volume:
@@ -217,7 +212,6 @@ tests:
errorMessage: hostPath not set on item some_volume
- it: should fail with not set server on nfs
documentIndex: *deploymentDoc
set:
persistence:
some_volume:
@@ -230,7 +224,6 @@ tests:
errorMessage: NFS Server not set on item some_volume
- it: should fail with not set path on nfs
documentIndex: *deploymentDoc
set:
persistence:
some_volume:
@@ -243,7 +236,6 @@ tests:
errorMessage: NFS Path not set on item some_volume
- it: should fail with not set objectName on secret
documentIndex: *deploymentDoc
set:
persistence:
some_volume:
@@ -255,7 +247,6 @@ tests:
errorMessage: objectName not set for persistence item some_volume
- it: should fail with not set objectName on configmap
documentIndex: *deploymentDoc
set:
persistence:
some_volume:
@@ -363,7 +354,6 @@ tests:
defaultMode: 644
- it: should fail with added secret and no key on items
documentIndex: *deploymentDoc
set:
persistence:
some_volume:
@@ -378,7 +368,6 @@ tests:
errorMessage: No key was given for persistence item some_volume
- it: should fail with added secret and no path on items
documentIndex: *deploymentDoc
set:
persistence:
some_volume:
@@ -441,7 +430,6 @@ tests:
path: some_path
- it: should fail with not set objectName on configMap
documentIndex: *deploymentDoc
set:
persistence:
some_volume:
@@ -571,7 +559,6 @@ tests:
path: some_path
- it: should fail with added configMap and no key on items
documentIndex: *deploymentDoc
set:
persistence:
some_volume:
@@ -586,7 +573,6 @@ tests:
errorMessage: No key was given for persistence item some_volume
- it: should fail with added configMap and no path on items
documentIndex: *deploymentDoc
set:
persistence:
some_volume:

View File

@@ -99,7 +99,6 @@ tests:
periodSeconds: 10
- it: should fail with more than 1 primary ports
documentIndex: *deploymentDoc
set:
service:
main:

View File

@@ -23,7 +23,6 @@ tests:
timeoutSeconds: 5
- it: should fail with more than 1 primary services
documentIndex: *deploymentDoc
set:
service:
main: