fix tests

This commit is contained in:
Michael Jerger 2024-12-28 18:39:57 +01:00
parent 6deb73baec
commit 8608f49057
2 changed files with 10 additions and 9 deletions

View file

@ -5,7 +5,7 @@ ADD resources /tmp/
RUN /tmp/install.sh
ADD local/ /usr/local/lib/dda-backup
RUN init-bb.bb
ADD resources2 /tmp/
RUN install -m 0700 -o root -g root /tmp/test.bb /usr/local/bin/
# RUN install -m 0700 -o root -g root /tmp/check.bb /usr/local/bin/
RUN test.bb
#ADD resources2 /tmp/
#RUN install -m 0700 -o root -g root /tmp/test.bb /usr/local/bin/
#RUN install -m 0700 -o root -g root /tmp/check.bb /usr/local/bin/
#RUN test.bb

View file

@ -13,8 +13,9 @@
:debug true})
(def file-config (merge restic-repo {:backup-path "files"
:files ["/test-backup"]
:restore-target-directory "/test-restore"}))
:execution-directory "/var/backups/"
:files ["test-backup"]
:restore-target-directory "test-restore"}))
(def db-config (merge restic-repo {:backup-path "db"
:pg-db "mydb"
@ -30,9 +31,9 @@
(spit "/restic-pwd" "oldPassword")
(spit "/new-restic-pwd" "newPassword")
(tasks/shell "mkdir" "-p" "/test-backup")
(spit "/test-backup/file" "I was here")
(tasks/shell "mkdir" "-p" "/test-restore")
(tasks/shell "mkdir" "-p" "/var/backups/test-backup")
(spit "/var/backups/test-backup/file" "I was here")
(tasks/shell "mkdir" "-p" "/var/backups/test-restore")
(pg/create-pg-pass! db-config))
(defn check-env-or-file