This commit is contained in:
bom 2022-03-18 14:11:43 +01:00
parent aca8c7a397
commit 4538cc5a24

View file

@ -70,11 +70,29 @@
:kind "PersistentVolumeClaim"
:metadata {:name "cloud-pvc"
:labels {:app.kubernetes.io/application "cloud"}}
:spec {:storageClassName "manual"
:spec {:storageClassName "local-path"
:accessModes ["ReadWriteOnce"]
:resources {:requests {:storage "50Gi"}}
:selector {:matchLabels {:app.kubernetes.io/application "cloud"}}}}
(cut/generate-pvc {:nextcloud-data-volume-path "xx"}))))
(cut/generate-pvc {})))
(is (= {:apiVersion "v1"
:kind "PersistentVolumeClaim"
:metadata {:name "cloud-pvc"
:labels {:app.kubernetes.io/application "cloud"}}
:spec {:storageClassName "manual"
:accessModes ["ReadWriteOnce"]
:resources {:requests {:storage "50Gi"}}
:selector {:matchLabels {:app.kubernetes.io/application "cloud"}}}}
(cut/generate-pvc {:nextcloud-data-volume-path "xx"})))
(is (= {:apiVersion "v1"
:kind "PersistentVolumeClaim"
:metadata {:name "cloud-pvc"
:labels {:app.kubernetes.io/application "cloud"}}
:spec {:storageClassName "manual"
:accessModes ["ReadWriteOnce"]
:resources {:requests {:storage "500Gi"}}
:selector {:matchLabels {:app.kubernetes.io/application "cloud"}}}}
(cut/generate-pvc {:pv-storage-size-gb 500}))))
(deftest should-generate-deployment
(is (= {:apiVersion "apps/v1"