From dba7beae1cf847ad60ba1dea538424c9bc3ed791 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Thu, 18 Feb 2021 15:21:27 +0100 Subject: [PATCH] hooks/test_backup_metadata: no need to check metadata if node does not have bundle:backup-client --- hooks/test_backup_metadata.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hooks/test_backup_metadata.py b/hooks/test_backup_metadata.py index 5297212..49b12c2 100644 --- a/hooks/test_backup_metadata.py +++ b/hooks/test_backup_metadata.py @@ -1,8 +1,8 @@ def test_node(repo, node, **kwargs): + if not node.has_bundle('backup-client'): + return + if node.metadata.get('backups', {}).get('exclude_from_backups', False): return - if node.dummy: - return - assert len(node.metadata.get('backups', {}).get('paths', set())) > 0, f'{node.name} has backups configured, but no backup paths defined!'