bundles/backup-server: dummy nodes never do backups
bundlewrap/pipeline/head There was a failure building this commit Details

This commit is contained in:
Franzi 2020-11-13 21:56:15 +01:00
parent 42133b92de
commit e515378497
Signed by: kunsi
GPG Key ID: 12E3D2136B818350
2 changed files with 8 additions and 3 deletions

View File

@ -3,7 +3,7 @@ def get_my_clients(metadata):
my_clients = {}
for rnode in repo.nodes:
if rnode.metadata.get('backups/exclude_from_backups', False):
if rnode.metadata.get('backups/exclude_from_backups', False) or rnode.dummy:
continue
my_clients[rnode.name] = {

View File

@ -1,3 +1,8 @@
def test_node(repo, node, **kwargs):
if not node.metadata.get('backups', {}).get('exclude_from_backups', False):
assert len(node.metadata.get('backups', {}).get('paths', set())) > 0, f'{node.name} has backups configured, but no backup paths defined!'
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!'