mirror of
https://github.com/truecharts/library-charts.git
synced 2026-07-03 10:54:36 -03:00
Delete library/common-test/tests/scaleCertificate/validation_test.yaml
This commit is contained in:
@@ -1,146 +0,0 @@
|
||||
suite: scale certificate validation test
|
||||
templates:
|
||||
- common.yaml
|
||||
release:
|
||||
name: test-release-name
|
||||
namespace: test-release-namespace
|
||||
tests:
|
||||
- it: should fail with name longer than 253 characters
|
||||
set:
|
||||
scaleCertificate:
|
||||
my-certificate-super-long-name-that-is-longer-than-253-characters-my-certificate-super-long-name-that-is-longer-than-253-characters-my-certificate-super-long-name-that-is-longer-than-253-characters-my-certificate-super-long-long-long-long-long-long-name:
|
||||
enabled: true
|
||||
id: 1
|
||||
asserts:
|
||||
- failedTemplate:
|
||||
errorMessage: Name [test-release-name-common-test-my-certificate-super-long-name-that-is-longer-than-253-characters-my-certificate-super-long-name-that-is-longer-than-253-characters-my-certificate-super-long-name-that-is-longer-than-253-characters-my-certificate-super-long-long-long-long-long-long-name] is not valid. Must start and end with an alphanumeric lowercase character. It can contain '-'. And must be at most 253 characters.
|
||||
|
||||
- it: should fail with name starting with underscore
|
||||
set:
|
||||
scaleCertificate:
|
||||
_my-cert:
|
||||
enabled: true
|
||||
id: 1
|
||||
asserts:
|
||||
- failedTemplate:
|
||||
errorMessage: Name [test-release-name-common-test-_my-cert] is not valid. Must start and end with an alphanumeric lowercase character. It can contain '-'. And must be at most 253 characters.
|
||||
|
||||
- it: should fail with labels not a dict
|
||||
set:
|
||||
scaleCertificate:
|
||||
my-cert:
|
||||
enabled: true
|
||||
labels: "not a dict"
|
||||
id: 1
|
||||
asserts:
|
||||
- failedTemplate:
|
||||
errorMessage: Certificate - Expected [labels] to be a dictionary, but got [string]
|
||||
|
||||
- it: should fail with annotations not a dict
|
||||
set:
|
||||
scaleCertificate:
|
||||
my-cert:
|
||||
enabled: true
|
||||
annotations: "not a dict"
|
||||
id: 1
|
||||
asserts:
|
||||
- failedTemplate:
|
||||
errorMessage: Certificate - Expected [annotations] to be a dictionary, but got [string]
|
||||
|
||||
- it: should fail without id
|
||||
set:
|
||||
scaleCertificate:
|
||||
my-cert:
|
||||
enabled: true
|
||||
id: ""
|
||||
asserts:
|
||||
- failedTemplate:
|
||||
errorMessage: Certificate - Expected non-empty [id]
|
||||
|
||||
- it: should fail with targetSelector not a dict
|
||||
set:
|
||||
scaleCertificate:
|
||||
my-cert:
|
||||
enabled: true
|
||||
id: 1
|
||||
targetSelector: "not a dict"
|
||||
asserts:
|
||||
- failedTemplate:
|
||||
errorMessage: Certificate - Expected [targetSelector] to be a [map], but got [string]
|
||||
|
||||
- it: should fail with empty ixCertificates when cert is defined
|
||||
set:
|
||||
ixCertificates: []
|
||||
scaleCertificate:
|
||||
my-cert:
|
||||
enabled: true
|
||||
id: 1
|
||||
asserts:
|
||||
- failedTemplate:
|
||||
errorMessage: Certificate - Expected non-empty [ixCertificates]
|
||||
|
||||
- it: should fail with not defined id in ixCertificates when cert is defined
|
||||
set:
|
||||
ixCertificates:
|
||||
"2":
|
||||
key: value
|
||||
scaleCertificate:
|
||||
my-cert:
|
||||
enabled: true
|
||||
id: 1
|
||||
asserts:
|
||||
- failedTemplate:
|
||||
errorMessage: Certificate - Expected certificate with [id] ["1"] to exist in [ixCertificates]
|
||||
|
||||
- it: should fail with with revoked cert
|
||||
set:
|
||||
ixCertificates:
|
||||
"1":
|
||||
revoked: true
|
||||
scaleCertificate:
|
||||
my-cert:
|
||||
enabled: true
|
||||
id: 1
|
||||
asserts:
|
||||
- failedTemplate:
|
||||
errorMessage: Certificate - Expected non-revoked certificate with [id] ["1"]
|
||||
|
||||
- it: should fail with with expired cert
|
||||
set:
|
||||
ixCertificates:
|
||||
"1":
|
||||
expired: true
|
||||
scaleCertificate:
|
||||
my-cert:
|
||||
enabled: true
|
||||
id: 1
|
||||
asserts:
|
||||
- failedTemplate:
|
||||
errorMessage: Certificate - Expected non-expired certificate with [id] ["1"]
|
||||
|
||||
- it: should fail with with empty certificate
|
||||
set:
|
||||
ixCertificates:
|
||||
"1":
|
||||
certificate: ""
|
||||
scaleCertificate:
|
||||
my-cert:
|
||||
enabled: true
|
||||
id: 1
|
||||
asserts:
|
||||
- failedTemplate:
|
||||
errorMessage: Certificate - Expected non-empty [certificate] in certificate with [id] ["1"] in [ixCertificates]
|
||||
|
||||
- it: should fail with with empty privatekey
|
||||
set:
|
||||
ixCertificates:
|
||||
"1":
|
||||
certificate: some_value
|
||||
privatekey: ""
|
||||
scaleCertificate:
|
||||
my-cert:
|
||||
enabled: true
|
||||
id: 1
|
||||
asserts:
|
||||
- failedTemplate:
|
||||
errorMessage: Certificate - Expected non-empty [privatekey] in certificate with [id] ["1"] in [ixCertificates]
|
||||
Reference in New Issue
Block a user