From 0e617e777894e0e179eae717f0296dc6c5feabc9 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Wed, 24 Jul 2024 07:51:31 +0200 Subject: [PATCH] accept foreman.dump as offline file in 3.12+ https://github.com/theforeman/foreman_maintain/pull/893 switched the db backups to dump --- bats/fb-test-backup.bats | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bats/fb-test-backup.bats b/bats/fb-test-backup.bats index e4e4e5ba1..14b6597ef 100644 --- a/bats/fb-test-backup.bats +++ b/bats/fb-test-backup.bats @@ -39,7 +39,13 @@ BACKUP_ONLINE_DIR="${BACKUP_BASE_DIR}/online" tFileExists "${BACKUP_OFFLINE_DIR}/config_files.tar.gz" tFileExists "${BACKUP_OFFLINE_DIR}/metadata.yml" - tFileExists "${BACKUP_OFFLINE_DIR}/pgsql_data.tar.gz" + + FOREMAN_VERSION=$(tForemanVersion) + if tIsVersionNewer "${FOREMAN_VERSION}" 3.12; then + tFileExists "${BACKUP_OFFLINE_DIR}/foreman.dump" + else + tFileExists "${BACKUP_OFFLINE_DIR}/pgsql_data.tar.gz" + fi } @test "check offline backup contents for Katello" {