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

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 = {} my_clients = {}
for rnode in repo.nodes: 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 continue
my_clients[rnode.name] = { my_clients[rnode.name] = {

View file

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