From 8608f49057a44f904ff06098ffe837087f84f68d Mon Sep 17 00:00:00 2001 From: Michael Jerger Date: Sat, 28 Dec 2024 18:39:57 +0100 Subject: [PATCH] fix tests --- infrastructure/backup/image/Dockerfile | 8 ++++---- infrastructure/backup/test/resources/test.bb | 11 ++++++----- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/infrastructure/backup/image/Dockerfile b/infrastructure/backup/image/Dockerfile index a0bef70..5954507 100644 --- a/infrastructure/backup/image/Dockerfile +++ b/infrastructure/backup/image/Dockerfile @@ -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 diff --git a/infrastructure/backup/test/resources/test.bb b/infrastructure/backup/test/resources/test.bb index a129154..ac9d6f2 100755 --- a/infrastructure/backup/test/resources/test.bb +++ b/infrastructure/backup/test/resources/test.bb @@ -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