refactor: rename fragments directory to ingredients and update all references
- Directory rename: fragments/ → ingredients/ (54 .ks files) - Updated all Python scripts: * tests/integration/conftest.py - fixture renames * tests/integration/test_integration.py - constant and path updates * tests/test_recipe_generator.py - updated test assertions * recipe-generator/validators.py - updated comments and error messages * recipe-generator/recipe_generator.py - updated comment - Updated all YAML files: * recipe-generator/recipe_templates.yaml - 66 path references * .gitea/workflows/validate-fragments.yaml → validate-ingredients.yaml * .gitea/workflows/test-generation.yaml - path patterns - Updated scripts: * bin/ksflatten-relative - updated path detection - Updated test file: * tests/integration/test_fragments.py → test_ingredients.py - Updated documentation: * DEVELOPMENT.md - simplified references * DEVELOPMENT_QUICK.md - updated examples * tests/container/README.md - test references - Regenerated all recipes (16 files) with ingredient paths - Updated test fixtures (7 files) - All integration tests pass (5/5) - All unit tests pass (29/31 - 2 pre-existing failures unrelated)
This commit is contained in:
@@ -59,10 +59,10 @@ class TestRecipeGenerator:
|
||||
storage='standard',
|
||||
security='secure')
|
||||
assert '# An install recipe for desktop, server, or hypervisor' in content
|
||||
assert '%include fragments/core/base.ks' in content
|
||||
assert '%include fragments/desktop/gnome/packages.ks' in content
|
||||
assert '%include fragments/repo/fedora-43-mirrors.ks' in content
|
||||
assert '%include fragments/core/security/enabled.ks' in content
|
||||
assert '%include ingredients/core/base.ks' in content
|
||||
assert '%include ingredients/desktop/gnome/packages.ks' in content
|
||||
assert '%include ingredients/repo/fedora-43-mirrors.ks' in content
|
||||
assert '%include ingredients/core/security/enabled.ks' in content
|
||||
|
||||
def test_generate_virtual_desktop_encrypted(self):
|
||||
"""Test generating encrypted desktop recipe."""
|
||||
@@ -70,7 +70,7 @@ class TestRecipeGenerator:
|
||||
desktop='gnome',
|
||||
storage='encrypted',
|
||||
security='secure')
|
||||
assert '%include fragments/storage/encrypted.ks' in content
|
||||
assert '%include ingredients/storage/encrypted.ks' in content
|
||||
|
||||
def test_generate_virtual_desktop_labwc(self):
|
||||
"""Test generating LabWC desktop recipe."""
|
||||
@@ -78,8 +78,8 @@ class TestRecipeGenerator:
|
||||
desktop='labwc',
|
||||
storage='standard',
|
||||
security='secure')
|
||||
assert '%include fragments/desktop/labwc/config.ks' in content
|
||||
assert '%include fragments/desktop/gnome/packages.ks' not in content
|
||||
assert '%include ingredients/desktop/labwc/config.ks' in content
|
||||
assert '%include ingredients/desktop/gnome/packages.ks' not in content
|
||||
|
||||
def test_generate_virtual_desktop_devel(self):
|
||||
"""Test generating development mode desktop recipe."""
|
||||
@@ -87,7 +87,7 @@ class TestRecipeGenerator:
|
||||
desktop='gnome',
|
||||
storage='standard',
|
||||
security='off')
|
||||
assert '%include fragments/core/security/disabled.ks' in content
|
||||
assert '%include ingredients/core/security/disabled.ks' in content
|
||||
|
||||
def test_generate_virtual_server(self):
|
||||
"""Test generating server recipe."""
|
||||
@@ -95,7 +95,7 @@ class TestRecipeGenerator:
|
||||
initial_setup='server',
|
||||
security='secure')
|
||||
assert '# An install recipe for desktop, server, or hypervisor' in content
|
||||
assert '%include fragments/initial-setup/server/config.ks' in content
|
||||
assert '%include ingredients/initial-setup/server/config.ks' in content
|
||||
|
||||
def test_generate_desktop_hypervisor_amd(self):
|
||||
"""Test generating AMD CPU hypervisor recipe."""
|
||||
@@ -104,8 +104,8 @@ class TestRecipeGenerator:
|
||||
hypervisor='base',
|
||||
hypervisor_type='amdcpu',
|
||||
security='secure')
|
||||
assert '%include fragments/hypervisor/amdcpu.ks' in content
|
||||
assert '%include fragments/hypervisor/intelcpu.ks' not in content
|
||||
assert '%include ingredients/hypervisor/amdcpu.ks' in content
|
||||
assert '%include ingredients/hypervisor/intelcpu.ks' not in content
|
||||
|
||||
def test_generate_desktop_hypervisor_intel_gpu(self):
|
||||
"""Test generating Intel CPU+GPU hypervisor recipe."""
|
||||
@@ -114,7 +114,7 @@ class TestRecipeGenerator:
|
||||
hypervisor='base',
|
||||
hypervisor_type='intelcpu',
|
||||
security='secure')
|
||||
assert '%include fragments/hypervisor/intelcpu.ks' in content
|
||||
assert '%include ingredients/hypervisor/intelcpu.ks' in content
|
||||
|
||||
def test_generate_live_desktop(self):
|
||||
"""Test generating live desktop recipe."""
|
||||
@@ -122,15 +122,15 @@ class TestRecipeGenerator:
|
||||
desktop='gnome',
|
||||
security='secure')
|
||||
assert '# A live recipe for live-desktop or live-server' in content
|
||||
assert '%include fragments/live/core/base.ks' in content
|
||||
assert '%include fragments/live/core/storage.ks' in content
|
||||
assert '%include ingredients/live/core/base.ks' in content
|
||||
assert '%include ingredients/live/core/storage.ks' in content
|
||||
|
||||
def test_generate_live_server(self):
|
||||
"""Test generating live server recipe."""
|
||||
content = self.generator.generate_recipe('live', 'rawhide',
|
||||
security='secure')
|
||||
assert '# A live recipe for live-desktop or live-server' in content
|
||||
assert '%include fragments/live/core/base.ks' in content
|
||||
assert '%include ingredients/live/core/base.ks' in content
|
||||
|
||||
def test_no_duplicate_includes(self):
|
||||
"""Test that duplicate includes are prevented."""
|
||||
@@ -144,13 +144,13 @@ class TestRecipeGenerator:
|
||||
assert len(paths) == len(set(paths)), "Found duplicate %include entries"
|
||||
|
||||
def test_missing_ingredient_detection(self):
|
||||
"""Test that missing fragments are detected."""
|
||||
"""Test that missing ingredients are detected."""
|
||||
content = self.generator.generate_recipe('install', '43',
|
||||
desktop='gnome',
|
||||
storage='standard',
|
||||
security='secure')
|
||||
issues = self.generator.validate_recipe(content)
|
||||
assert issues == [], f"Found missing fragments: {issues}"
|
||||
assert issues == [], f"Found missing ingredients: {issues}"
|
||||
|
||||
def test_filename_generation_standard(self):
|
||||
"""Test filename generation for standard configuration."""
|
||||
|
||||
Reference in New Issue
Block a user