refactor: Remove filename deduplication to generate all 24 variants
- Removed deduplication logic from cli.py - All 24 variants now processed (some overwrite with same filename) - manifests: Added comments explaining cartesian product and filename behavior - tests: Updated assertions for correct filename generation order - Added 3 new tests for guest_agents and hardware_support modifiers
This commit is contained in:
@@ -37,7 +37,7 @@ def test_validate_all_generated_recipes():
|
||||
"""Test validating all generated recipes."""
|
||||
# Count generated recipes
|
||||
recipe_count = len(list(RECIPE_DIR.glob('*.cfg')))
|
||||
assert recipe_count > 0, "No recipes generated"
|
||||
assert recipe_count > 0, f"Expected recipes, got {recipe_count}"
|
||||
|
||||
# Validate each recipe
|
||||
for recipe_file in RECIPE_DIR.glob('*.cfg'):
|
||||
|
||||
@@ -245,3 +245,25 @@ part / --fstype="ext4" --grow
|
||||
content = ""
|
||||
issues = self.generator.validate_recipe_semantic(content, '43')
|
||||
assert issues == []
|
||||
|
||||
def test_filename_generation_with_guest_agents(self):
|
||||
"""Test filename includes 'virtual' when guest_agents=True."""
|
||||
filename = self.generator.generate_filename('install', '43',
|
||||
variant_type='desktop',
|
||||
guest_agents=True)
|
||||
assert filename == 'install_virtual_desktop_43.cfg'
|
||||
|
||||
def test_filename_generation_with_hardware_support(self):
|
||||
"""Test filename includes 'hardware-support' when enabled."""
|
||||
filename = self.generator.generate_filename('install', '43',
|
||||
variant_type='desktop',
|
||||
hardware_support=True)
|
||||
assert filename == 'install_desktop_hardware-support_43.cfg'
|
||||
|
||||
def test_filename_generation_with_both_modifiers(self):
|
||||
"""Test filename includes both modifiers when enabled."""
|
||||
filename = self.generator.generate_filename('install', '43',
|
||||
variant_type='desktop',
|
||||
guest_agents=True,
|
||||
hardware_support=True)
|
||||
assert filename == 'install_virtual_desktop_hardware-support_43.cfg'
|
||||
|
||||
Reference in New Issue
Block a user