Skip to content
Snippets Groups Projects
Commit 0c2fc1be authored by Florent Thiery's avatar Florent Thiery
Browse files

test all folders, refs #21677

parent 797f9fb7
No related branches found
No related tags found
No related merge requests found
......@@ -68,6 +68,7 @@ def test_backup_space(server):
def check_local_backup(path):
all_ok = True
for d in os.listdir(path):
subd = os.path.join(path, d)
latest = os.path.join(subd, 'latest')
......@@ -78,13 +79,13 @@ def check_local_backup(path):
diff_seconds = (now - d).total_seconds()
if diff_seconds > 25*3600:
print('Backup %s is older than a day' % subd)
return False
all_ok = False
else:
print('Backup %s is fine' % subd)
return True
else:
print('Backup %s is not okay (no %s file)' % (subd, latest))
return False
all_ok = False
return all_ok
def check_local_backups(paths):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment