42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
suite: cnpg cluster name test
|
|
templates:
|
|
- common.yaml
|
|
release:
|
|
name: test-release-name
|
|
namespace: test-release-namespace
|
|
tests:
|
|
- it: should generate correct name
|
|
set:
|
|
cnpg:
|
|
my-pg:
|
|
enabled: true
|
|
user: test-user
|
|
database: test-db
|
|
password: test-password
|
|
my-pg2:
|
|
enabled: true
|
|
user: test-user
|
|
database: test-db
|
|
password: test-password
|
|
asserts:
|
|
- documentIndex: &clusterDoc 0
|
|
isKind:
|
|
of: Cluster
|
|
- documentIndex: *clusterDoc
|
|
isAPIVersion:
|
|
of: postgresql.cnpg.io/v1
|
|
- documentIndex: *clusterDoc
|
|
equal:
|
|
path: metadata.name
|
|
value: test-release-name-common-test-cnpg-my-pg
|
|
- documentIndex: &otherclusterDoc 1
|
|
isKind:
|
|
of: Cluster
|
|
- documentIndex: *otherclusterDoc
|
|
isAPIVersion:
|
|
of: postgresql.cnpg.io/v1
|
|
- documentIndex: *otherclusterDoc
|
|
equal:
|
|
path: metadata.name
|
|
value: test-release-name-common-test-cnpg-my-pg2
|