add test for checking behavior on symlinks

This commit is contained in:
Frederik Ring 2021-09-04 10:09:51 +02:00
parent 8aba98c012
commit 5922820ada
3 changed files with 5 additions and 1 deletions

2
go.mod
View File

@ -7,7 +7,7 @@ require (
github.com/gofrs/flock v0.8.1
github.com/kelseyhightower/envconfig v1.4.0
github.com/leekchan/timeutil v0.0.0-20150802142658-28917288c48d
github.com/m90/targz v0.0.0-20210904080153-f3929d2235bc
github.com/m90/targz v0.0.0-20210904082215-2e9a4529a615
github.com/minio/minio-go/v7 v7.0.12
github.com/sirupsen/logrus v1.8.1
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5

2
go.sum
View File

@ -413,6 +413,8 @@ github.com/m90/targz v0.0.0-20210903165208-2619a50ded33 h1:YFpJF7QUAb2z/pviBm58v
github.com/m90/targz v0.0.0-20210903165208-2619a50ded33/go.mod h1:YZK3bSO/oVlk9G+v00BxgzxW2Us4p/R4ysHOBjk0fJI=
github.com/m90/targz v0.0.0-20210904080153-f3929d2235bc h1:cNfcJUU7pra4Kz6XN1GbF6bHg7KWDitCxn1z4rJIqc8=
github.com/m90/targz v0.0.0-20210904080153-f3929d2235bc/go.mod h1:YZK3bSO/oVlk9G+v00BxgzxW2Us4p/R4ysHOBjk0fJI=
github.com/m90/targz v0.0.0-20210904082215-2e9a4529a615 h1:rn0LO2tQEgCDOct8qnbcslTUpAIWdVlWcGkjoumhf2U=
github.com/m90/targz v0.0.0-20210904082215-2e9a4529a615/go.mod h1:YZK3bSO/oVlk9G+v00BxgzxW2Us4p/R4ysHOBjk0fJI=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=

View File

@ -9,6 +9,7 @@ mkdir -p local
docker-compose up -d
sleep 5
docker-compose exec offen ln -s /var/opt/offen/offen.db /var/opt/offen/db.link
docker-compose exec backup backup
docker run --rm -it \
@ -20,6 +21,7 @@ echo "[TEST:PASS] Found relevant files in untared remote backup."
echo 1234secret | gpg -d --yes --passphrase-fd 0 ./local/test.tar.gz.gpg > ./local/decrypted.tar.gz
tar -xf ./local/decrypted.tar.gz -C /tmp && test -f /tmp/backup/app_data/offen.db
rm ./local/decrypted.tar.gz
test -L /tmp/backup/app_data/db.link
echo "[TEST:PASS] Found relevant files in untared local backup."