bundlewrap/hooks/test_backup_metadata.py
2021-02-18 15:21:53 +01:00

8 lines
332 B
Python

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
assert len(node.metadata.get('backups', {}).get('paths', set())) > 0, f'{node.name} has backups configured, but no backup paths defined!'