mirror of
https://github.com/offen/docker-volume-backup.git
synced 2024-11-24 22:20:28 +01:00
Fix log fetching
This commit is contained in:
parent
2db707cc33
commit
a64c6ab9e1
@ -15,17 +15,15 @@ sleep 5
|
|||||||
|
|
||||||
expect_running_containers "3"
|
expect_running_containers "3"
|
||||||
|
|
||||||
dvb_logs=$(docker logs dropbox-backup-1 2>&1)
|
dvb_logs=$(docker compose logs backup)
|
||||||
if $dvb_logs | grep "ERROR"
|
if echo "$dvb_logs" | grep -q "ERROR"; then
|
||||||
then
|
|
||||||
fail "Backup failed, errors reported: $dvb_logs"
|
fail "Backup failed, errors reported: $dvb_logs"
|
||||||
else
|
else
|
||||||
pass "Backup succeeded, no errors reported."
|
pass "Backup succeeded, no errors reported."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dbx_logs=$(docker logs dropbox-openapi_mock-1 2>&1)
|
dbx_logs=$(docker compose logs openapi_mock)
|
||||||
if $dbx_logs | grep "ERROR"
|
if echo "$dbx_logs" | grep -q "ERROR"; then
|
||||||
then
|
|
||||||
fail "Backup failed, errors reported: $dvb_logs"
|
fail "Backup failed, errors reported: $dvb_logs"
|
||||||
else
|
else
|
||||||
pass "Backup succeeded, no errors reported."
|
pass "Backup succeeded, no errors reported."
|
||||||
@ -39,9 +37,8 @@ sleep 5
|
|||||||
|
|
||||||
docker compose exec backup backup
|
docker compose exec backup backup
|
||||||
|
|
||||||
dvb_logs=$(docker logs dropbox-backup-1 2>&1)
|
dvb_logs=$(docker compose logs backup)
|
||||||
if $dvb_logs | grep "Refusing to do so, please check your configuratio"
|
if echo "$dvb_logs" | grep -q "Refusing to do so, please check your configuration"; then
|
||||||
then
|
|
||||||
pass "Remote backups have not been deleted."
|
pass "Remote backups have not been deleted."
|
||||||
else
|
else
|
||||||
fail "Remote backups would have been deleted: $dvb_logs"
|
fail "Remote backups would have been deleted: $dvb_logs"
|
||||||
|
Loading…
Reference in New Issue
Block a user