From a61452fd911e069caefa6fc0869b4d0b2c3e4dc0 Mon Sep 17 00:00:00 2001 From: Einar Forselv Date: Mon, 25 Nov 2019 21:21:17 +0100 Subject: [PATCH] Test commands --- restic_volume_backup/cli.py | 5 ++++- restic_volume_backup/restic.py | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/restic_volume_backup/cli.py b/restic_volume_backup/cli.py index 9062f5b..47fd525 100644 --- a/restic_volume_backup/cli.py +++ b/restic_volume_backup/cli.py @@ -95,8 +95,11 @@ def start_backup_process(config, containers): # Waste a few seconds faking a backup print("Fake backup running") + + # restic.test() + import time - for i in range(5): + for i in range(3): time.sleep(1) logger.info('test') print(i) diff --git a/restic_volume_backup/restic.py b/restic_volume_backup/restic.py index 8b574bf..8f68171 100644 --- a/restic_volume_backup/restic.py +++ b/restic_volume_backup/restic.py @@ -3,6 +3,11 @@ from subprocess import Popen, PIPE logger = logging.getLogger(__name__) +def test(): + run_command(['pwd']) + run_command(['ls', '-l']) + run_command(['ls', '/backup']) + def init_repo(repository): """