-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test & fix: add test cases for workloads, fix labels of hooks (#51)
* chore: bump risingwave to v1.7.1 and release Signed-off-by: arkbriar <[email protected]> * Add test cases for meta store and state store, deprecate root fields Signed-off-by: arkbriar <[email protected]> * Add tests for standalone Signed-off-by: arkbriar <[email protected]> * Fix typo Signed-off-by: arkbriar <[email protected]> --------- Signed-off-by: arkbriar <[email protected]>
- Loading branch information
Showing
15 changed files
with
1,539 additions
and
591 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
suite: Test diagnose mode | ||
templates: | ||
- templates/meta-sts.yaml | ||
- templates/compute-sts.yaml | ||
- templates/frontend-deploy.yaml | ||
- templates/compactor-deploy.yaml | ||
- templates/standalone/standalone-sts.yaml | ||
chart: | ||
appVersion: 1.0.0 | ||
version: 0.0.1 | ||
set: | ||
diagnosticMode: | ||
enabled: true | ||
command: | ||
- sleep | ||
args: | ||
- infinity | ||
tests: | ||
- it: pods must not have probes (cluster) | ||
templates: | ||
- templates/meta-sts.yaml | ||
- templates/compute-sts.yaml | ||
- templates/frontend-deploy.yaml | ||
- templates/compactor-deploy.yaml | ||
asserts: | ||
- hasDocuments: | ||
count: 1 | ||
- notExists: | ||
path: spec.template.spec.livenessProbe | ||
- notExists: | ||
path: spec.template.spec.readinessProbe | ||
- notExists: | ||
path: spec.template.spec.startupProbe | ||
- it: pods must not have probes (standalone) | ||
set: | ||
standalone.enabled: true | ||
templates: | ||
- templates/standalone/standalone-sts.yaml | ||
asserts: | ||
- hasDocuments: | ||
count: 1 | ||
- notExists: | ||
path: spec.template.spec.livenessProbe | ||
- notExists: | ||
path: spec.template.spec.readinessProbe | ||
- notExists: | ||
path: spec.template.spec.startupProbe | ||
- it: pods must start with debug command and arguments (cluster) | ||
templates: | ||
- templates/meta-sts.yaml | ||
- templates/compute-sts.yaml | ||
- templates/frontend-deploy.yaml | ||
- templates/compactor-deploy.yaml | ||
asserts: | ||
- hasDocuments: | ||
count: 1 | ||
- equal: | ||
path: spec.template.spec.containers[0].command | ||
value: | ||
- sleep | ||
- equal: | ||
path: spec.template.spec.containers[0].args | ||
value: | ||
- infinity | ||
- it: pods must start with debug command and arguments (standalone) | ||
set: | ||
standalone.enabled: true | ||
templates: | ||
- templates/standalone/standalone-sts.yaml | ||
asserts: | ||
- hasDocuments: | ||
count: 1 | ||
- equal: | ||
path: spec.template.spec.containers[0].command | ||
value: | ||
- sleep | ||
- equal: | ||
path: spec.template.spec.containers[0].args | ||
value: | ||
- infinity |
176 changes: 176 additions & 0 deletions
176
charts/risingwave/tests/metastore/meta-sts_env_test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
suite: Test meta store env vars (meta-sts) | ||
templates: | ||
- templates/meta-sts.yaml | ||
chart: | ||
appVersion: 1.0.0 | ||
version: 0.0.1 | ||
tests: | ||
# Tests for etcd. | ||
## true-negative (etcd) | ||
- it: envs must not contain etcd endpoints (non-etcd) | ||
asserts: | ||
- notContains: | ||
path: spec.template.spec.containers[0].env | ||
content: | ||
name: RW_ETCD_ENDPOINTS | ||
any: true | ||
- it: envs must not contain etcd auth (non-etcd) | ||
asserts: | ||
- notContains: | ||
path: spec.template.spec.containers[0].env | ||
content: | ||
name: RW_ETCD_AUTH | ||
any: true | ||
- it: envs must not contain etcd username (non-etcd) | ||
asserts: | ||
- notContains: | ||
path: spec.template.spec.containers[0].env | ||
content: | ||
name: RW_ETCD_USERNAME | ||
any: true | ||
- it: envs must not contain etcd password (non-etcd) | ||
asserts: | ||
- notContains: | ||
path: spec.template.spec.containers[0].env | ||
content: | ||
name: RW_ETCD_PASSWORD | ||
any: true | ||
## true-positive (etcd) | ||
- it: envs must contain backend set to etcd (etcd) | ||
set: | ||
metaStore: | ||
etcd: | ||
enabled: true | ||
asserts: | ||
- contains: | ||
path: spec.template.spec.containers[0].env | ||
content: | ||
name: RW_BACKEND | ||
value: etcd | ||
- it: envs must contain etcd endpoints (etcd) | ||
set: | ||
metaStore: | ||
etcd: | ||
enabled: true | ||
endpoints: | ||
- ep1 | ||
asserts: | ||
- contains: | ||
path: spec.template.spec.containers[0].env | ||
content: | ||
name: RW_ETCD_ENDPOINTS | ||
value: ep1 | ||
- it: envs must support multiple etcd endpoints (etcd) | ||
set: | ||
metaStore: | ||
etcd: | ||
enabled: true | ||
endpoints: | ||
- ep1 | ||
- ep2 | ||
asserts: | ||
- contains: | ||
path: spec.template.spec.containers[0].env | ||
content: | ||
name: RW_ETCD_ENDPOINTS | ||
value: ep1,ep2 | ||
- it: envs must reflect auth, true (etcd) | ||
set: | ||
metaStore: | ||
etcd: | ||
enabled: true | ||
endpoints: | ||
- ep1 | ||
authentication: | ||
enabled: true | ||
asserts: | ||
- contains: | ||
path: spec.template.spec.containers[0].env | ||
content: | ||
name: RW_ETCD_AUTH | ||
value: "true" | ||
- it: envs must reflect auth, false (etcd) | ||
set: | ||
metaStore: | ||
etcd: | ||
enabled: true | ||
endpoints: | ||
- ep1 | ||
authentication: | ||
enabled: false | ||
asserts: | ||
- contains: | ||
path: spec.template.spec.containers[0].env | ||
content: | ||
name: RW_ETCD_AUTH | ||
value: "false" | ||
- equal: | ||
path: spec.template.spec.containers[0].envFrom | ||
value: null | ||
- notContains: | ||
path: spec.template.spec.containers[0].env | ||
content: | ||
name: RW_ETCD_USERNAME | ||
any: true | ||
- notContains: | ||
path: spec.template.spec.containers[0].env | ||
content: | ||
name: RW_ETCD_PASSWORD | ||
any: true | ||
- it: env from must contain the secret if username/password provided (etcd) | ||
set: | ||
metaStore: | ||
etcd: | ||
enabled: true | ||
endpoints: | ||
- ep1 | ||
authentication: | ||
enabled: true | ||
username: u | ||
password: p | ||
asserts: | ||
- contains: | ||
path: spec.template.spec.containers[0].envFrom | ||
content: | ||
secretRef: | ||
name: RELEASE-NAME-risingwave-etcd | ||
- notContains: | ||
path: spec.template.spec.containers[0].env | ||
content: | ||
name: RW_ETCD_USERNAME | ||
any: true | ||
- notContains: | ||
path: spec.template.spec.containers[0].env | ||
content: | ||
name: RW_ETCD_PASSWORD | ||
any: true | ||
- it: env must contain the secret if existing secret provided (etcd) | ||
set: | ||
metaStore: | ||
etcd: | ||
enabled: true | ||
endpoints: | ||
- ep1 | ||
authentication: | ||
enabled: true | ||
existingSecretName: s | ||
asserts: | ||
- equal: | ||
path: spec.template.spec.containers[0].envFrom | ||
value: null | ||
- contains: | ||
path: spec.template.spec.containers[0].env | ||
content: | ||
name: RW_ETCD_USERNAME | ||
valueFrom: | ||
secretKeyRef: | ||
key: username | ||
name: s | ||
- contains: | ||
path: spec.template.spec.containers[0].env | ||
content: | ||
name: RW_ETCD_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
key: password | ||
name: s |
Oops, something went wrong.