Skip to content

Commit

Permalink
expand smoke test with config overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
razvan committed Aug 22, 2024
1 parent cf74848 commit a1e6dd8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/templates/kuttl/smoke/60-install-hive.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,21 @@ spec:
envOverrides:
COMMON_VAR: role-value # overridden by role group below
ROLE_VAR: role-value # only defined here at role level
configOverrides:
hive-env.sh:
COMMON_VAR: role-value # overridden by role group below
ROLE_VAR: role-value # only defined here at role level
roleGroups:
default:
replicas: 1
envOverrides:
COMMON_VAR: group-value # overrides role value
GROUP_VAR: group-value # only defined here at group level
configOverrides:
hive-env.sh:
COMMON_VAR: group-value # overridden by role group below
GROUP_VAR: group-value # only defined here at group level

---
apiVersion: s3.stackable.tech/v1alpha1
kind: S3Connection
Expand Down
8 changes: 8 additions & 0 deletions tests/templates/kuttl/smoke/61-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,11 @@ commands:
kubectl -n $NAMESPACE get sts hive-metastore-default -o yaml | yq -e '.spec.template.spec.containers[] | select (.name == "hive") | .env[] | select (.name == "COMMON_VAR" and .value == "group-value")'
kubectl -n $NAMESPACE get sts hive-metastore-default -o yaml | yq -e '.spec.template.spec.containers[] | select (.name == "hive") | .env[] | select (.name == "GROUP_VAR" and .value == "group-value")'
kubectl -n $NAMESPACE get sts hive-metastore-default -o yaml | yq -e '.spec.template.spec.containers[] | select (.name == "hive") | .env[] | select (.name == "ROLE_VAR" and .value == "role-value")'
#
# Test configOverrides
#
- script: |
kubectl -n $NAMESPACE get cm hive-metastore-default -o yaml | yq -e '.data."hive-env.sh"' | grep "export ROLE_VAR=role-value"
kubectl -n $NAMESPACE get cm hive-metastore-default -o yaml | yq -e '.data."hive-env.sh"' | grep "export GROUP_VAR=group-value"
kubectl -n $NAMESPACE get cm hive-metastore-default -o yaml | yq -e '.data."hive-env.sh"' | grep "export COMMON_VAR=group-value"

Check failure on line 20 in tests/templates/kuttl/smoke/61-assert.yaml

View workflow job for this annotation

GitHub Actions / yamllint

[yamllint] tests/templates/kuttl/smoke/61-assert.yaml#L20

[error] too many blank lines (1 > 0) (empty-lines)
Raw output
./tests/templates/kuttl/smoke/61-assert.yaml:20:1: [error] too many blank lines (1 > 0) (empty-lines)

0 comments on commit a1e6dd8

Please sign in to comment.