From 76d5f146211f86630ac200cb58512b11e8134bed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florent=20Thi=C3=A9ry?= <fthiery@gmail.com> Date: Wed, 8 Nov 2017 21:14:05 +0100 Subject: [PATCH] cleanup all folders and not just one by one refs #23246 --- tests/test_backup.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_backup.py b/tests/test_backup.py index 4af6313d..da5287b6 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): -- GitLab