Skip to content

Commit

Permalink
icinga-kubernetes: Test database creation
Browse files Browse the repository at this point in the history
  • Loading branch information
lippserd committed Feb 23, 2024
1 parent f7194ac commit 805e936
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
27 changes: 27 additions & 0 deletions charts/icinga-stack/tests/global_database_statefulset_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,31 @@ tests:
name: database-icingaweb2
key: password

# Icinga Kubernetes DB
- it: deploys an Icinga Kubernetes database StatefulSet using values
documentIndex: 8
values:
- required_values.yaml
release:
name: my-icinga
asserts:
- containsDocument:
kind: StatefulSet
apiVersion: apps/v1
- equal:
path: metadata.name
value: my-icinga-icinga-stack-icinga-kubernetes-database
- contains:
path: spec.template.spec.containers[0].env
content:
name: MARIADB_USER
value: kubernetes
- contains:
path: spec.template.spec.containers[0].env
content:
name: MARIADB_PASSWORD
value: insecurekubernetesdbpassword

# Test persistence for databases
- it: deploys a PVC for a database if persistence is enabled
documentIndex: 0
Expand All @@ -253,6 +278,8 @@ tests:
global.databases.icingadb.password.value: insecurepassword
global.databases.icingaweb2.username.value: icingaweb2
global.databases.icingaweb2.password.value: insecurepassword
global.databases.kubernetes.username.value: kubernetes
global.databases.kubernetes.password.value: insecurepassword
release:
name: my-icinga
asserts:
Expand Down
5 changes: 5 additions & 0 deletions charts/icinga-stack/tests/required_values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,8 @@ global:
value: icingadb
password:
value: insecureicingadbpassword
kubernetes:
username:
value: kubernetes
password:
value: insecurekubernetesdbpassword

0 comments on commit 805e936

Please sign in to comment.