Skip to content

Commit 2e0a361

Browse files
author
Matthew Fisher
authored
Merge pull request #107 from bacongobbler/bump-backup-frequency
fix(contrib): assert 5 or 6 backups as acceptable
2 parents 3575f94 + 8bfc4ee commit 2e0a361

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

contrib/ci/test.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,10 @@ docker exec $PG_JOB is_running
7777
puts-step "checking if minio has 5 backups"
7878
BACKUPS="$(docker exec $MINIO_JOB ls /home/minio/dbwal/basebackups_005/ | grep json)"
7979
NUM_BACKUPS="$(docker exec $MINIO_JOB ls /home/minio/dbwal/basebackups_005/ | grep -c json)"
80-
if [[ ! "$NUM_BACKUPS" -eq "5" ]]; then
81-
puts-error "did not find 5 base backups, which is the default (found $NUM_BACKUPS)"
80+
# NOTE (bacongobbler): the BACKUP_FREQUENCY is only 1 second, so we could technically be checking
81+
# in the middle of a backup. Instead of failing, let's consider N+1 backups an acceptable case
82+
if [[ ! "$NUM_BACKUPS" -eq "5" && ! "$NUM_BACKUPS" -eq "6" ]]; then
83+
puts-error "did not find 5 or 6 base backups. 5 is the default, but 6 may exist if a backup is currently in progress (found $NUM_BACKUPS)"
8284
puts-error "$BACKUPS"
8385
exit 1
8486
fi

0 commit comments

Comments
 (0)