mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-09-07 20:46:16 +00:00
helm: add single-node unit tests
This commit is contained in:
@@ -128,6 +128,15 @@ tests:
|
||||
# namespace: NAMESPACE
|
||||
replication_factor = 7
|
||||
|
||||
- it: forces replication_factor to 1 when garage.singleNode is enabled
|
||||
set:
|
||||
garage.singleNode: true
|
||||
garage.replicationFactor: "5"
|
||||
asserts:
|
||||
- matchRegex:
|
||||
path: data["garage.toml"]
|
||||
pattern: 'replication_factor = 1'
|
||||
|
||||
- it: does not render a ConfigMap when an existing one is referenced
|
||||
set:
|
||||
garage.existingConfigMap: my-external-cm
|
||||
|
||||
@@ -167,6 +167,33 @@ tests:
|
||||
path: spec.template.spec.volumes[0].configMap.name
|
||||
value: my-external-cm
|
||||
|
||||
- it: runs a single replica with --single-node when garage.singleNode is enabled
|
||||
template: templates/workload.yaml
|
||||
set:
|
||||
garage.singleNode: true
|
||||
deployment.replicaCount: 3
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.replicas
|
||||
value: 1
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].command
|
||||
value:
|
||||
- /garage
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].args
|
||||
value:
|
||||
- server
|
||||
- --single-node
|
||||
|
||||
- it: does not set a custom command/args when garage.singleNode is disabled
|
||||
template: templates/workload.yaml
|
||||
asserts:
|
||||
- isNull:
|
||||
path: spec.template.spec.containers[0].command
|
||||
- isNull:
|
||||
path: spec.template.spec.containers[0].args
|
||||
|
||||
- it: uses a custom service account name without creating one when disabled
|
||||
template: templates/workload.yaml
|
||||
set:
|
||||
|
||||
Reference in New Issue
Block a user