bundlewrap/hooks/test_backup_metadata.py

4 lines
263 B
Python
Raw Normal View History

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!'