diff --git a/tests/test_backup.py b/tests/test_backup.py index 4af6313d9c7d39a6dc45bd0f330d43f8401e9660..da5287b666558683ea91c886d749e6737f7844e4 100755 --- a/tests/test_backup.py +++ b/tests/test_backup.py @@ -81,17 +81,17 @@ def test_backup_space(server=None, path="/backup"): def check_backup_is_incremental(path): # incremental backups done with tmbackup mean that they will all at least contain links dirs = os.listdir(path) + is_incremental = True for d in dirs: files_count = 0 folder_path = os.path.join(path, d) if os.path.isdir(folder_path): files_count = len(os.listdir(folder_path)) if files_count == 0: - print('Folder %s is empty, this indicates non-incremental backups (we are expecting links)' % folder_path) + print('Folder %s is empty, this indicates non-incremental backups (we are expecting links), removing folder' % folder_path) + is_incremental = False os.rmdir(folder_path) - print('Folder removed') - return False - return True + return is_incremental def check_local_backup(path):