diff --git a/src/test/cljc/dda/c4k_nextcloud/backup_test.cljc b/src/test/cljc/dda/c4k_nextcloud/backup_test.cljc index 5de5d75..227c4d6 100644 --- a/src/test/cljc/dda/c4k_nextcloud/backup_test.cljc +++ b/src/test/cljc/dda/c4k_nextcloud/backup_test.cljc @@ -25,7 +25,7 @@ (cut/generate-config {:restic-repository "s3:restic-repository"})))) (deftest should-generate-cron - (is (= {:apiVersion "batch/v1beta1" + (is (= {:apiVersion "batch/v1" :kind "CronJob" :metadata {:name "cloud-backup", :labels {:app.kubernetes.part-of "cloud"}} :spec diff --git a/src/test/cljc/dda/c4k_nextcloud/nextcloud_test.cljc b/src/test/cljc/dda/c4k_nextcloud/nextcloud_test.cljc index 0ba970b..5494fa0 100644 --- a/src/test/cljc/dda/c4k_nextcloud/nextcloud_test.cljc +++ b/src/test/cljc/dda/c4k_nextcloud/nextcloud_test.cljc @@ -16,7 +16,7 @@ :nextcloud-admin-password "cloudpassword"})))) (deftest should-generate-certificate - (is (= {:apiVersion "cert-manager.io/v1alpha2" + (is (= {:apiVersion "cert-manager.io/v1" :kind "Certificate" :metadata {:name "cloud-cert", :namespace "default"} :spec @@ -81,6 +81,14 @@ :name "cloud-app" :imagePullPolicy "IfNotPresent" :ports [{:containerPort 80}] + :livenessProbe + {:exec + {:command + ["/bin/sh" + "-c" + "PGPASSWORD=$POSTGRES_PASSWORD psql -h postgresql-service -U $POSTGRES_USER $POSTGRES_DB"]} + :initialDelaySeconds 1 + :periodSeconds 5} :env [{:name "NEXTCLOUD_ADMIN_USER", :valueFrom {:secretKeyRef {:name "cloud-secret", :key "nextcloud-admin-user"}}} {:name "NEXTCLOUD_ADMIN_PASSWORD"