forgejo-helm/unittests/deployment/storage-class-configuration.yaml
alexandra catalina 4cc8fb9f35 feat!: port updates from Gitea 10.1.1 chart (#356)
Co-authored-by: pat-s <patrick.schratz@gmail.com>
Co-authored-by: pat-s <pat-s@noreply.gitea.com>
Co-authored-by: justusbunsi <sk.bunsenbrenner@gmail.com>
Co-authored-by: remogeissbuehler <remogeissbuehler@noreply.gitea.com>
Co-authored-by: florianspk <florianspk@gmail.com>
Co-authored-by: Oliver Fueckert <oliver@cubinet.de>
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-on: https://codeberg.org/forgejo-contrib/forgejo-helm/pulls/356
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: alexandra catalina <git@garbage.world>
Co-committed-by: alexandra catalina <git@garbage.world>
2024-02-21 21:52:42 +00:00

39 lines
1.1 KiB
YAML

# File: tests/gitea-storageclass-tests.yaml
suite: storage class configuration tests
release:
name: gitea-storageclass-tests
namespace: testing
templates:
- templates/gitea/pvc.yaml
tests:
- it: should set storageClassName when persistence.storageClass is defined
template: templates/gitea/pvc.yaml
set:
persistence.storageClass: 'my-storage-class'
asserts:
- equal:
path: 'spec.storageClassName'
value: 'my-storage-class'
- it: should set global.storageClass when persistence.storageClass is not defined
template: templates/gitea/pvc.yaml
set:
global.storageClass: 'default-storage-class'
asserts:
- equal:
path: spec.storageClassName
value: 'default-storage-class'
- it: should set storageClassName when persistence.storageClass is defined and global.storageClass is defined
template: templates/gitea/pvc.yaml
set:
global.storageClass: 'default-storage-class'
persistence.storageClass: 'my-storage-class'
asserts:
- equal:
path: spec.storageClassName
value: 'my-storage-class'