All checks were successful
Smoke Test / smoke (pull_request) Successful in 11s
- Add ansible/inventory/hosts.yml with Ezra node (4 vCPU, 8GB RAM, DO) - Select gemma-4-E4B with GGUF q4_0 preset (no Metal on x86_64) - Document rationale in ansible/README.md - Add smoke test: tests/test_inventory_ezra.py (5 tests) All acceptance criteria met: - Ezra VPS hardware documented - Model variant selected - Added to inventory.ini (hosts.yml) - Deployment tested (smoke test)
30 lines
972 B
Python
30 lines
972 B
Python
#!/usr/bin/env python3
|
|
import yaml
|
|
from pathlib import Path
|
|
|
|
INVENTORY = Path(__file__).parent.parent / 'ansible' / 'inventory' / 'hosts.yml'
|
|
|
|
def test_inventory_exists():
|
|
assert INVENTORY.exists()
|
|
|
|
def test_inventory_valid_yaml():
|
|
assert isinstance(yaml.safe_load(INVENTORY.read_text()), dict)
|
|
|
|
def test_ezra_host_present():
|
|
data = yaml.safe_load(INVENTORY.read_text())
|
|
hosts = data['all']['children']['turboquant_nodes']['hosts']
|
|
assert 'ezra-vps' in hosts
|
|
|
|
def test_ezra_hardware_documented():
|
|
ezra = data['all']['children']['turboquant_nodes']['hosts']['ezra-vps']
|
|
hw = ezra['hardware']
|
|
assert 'cpu' in hw and 'memory_gb' in hw and 'gpu' in hw
|
|
assert '8' in str(hw['memory_gb'])
|
|
|
|
def test_ezra_model_selected():
|
|
ezra = data['all']['children']['turboquant_nodes']['hosts']['ezra-vps']
|
|
tq = ezra['turboquant']
|
|
assert tq['enabled'] is True
|
|
assert 'gemma-4' in tq['model'].lower()
|
|
assert tq['preset'] == 'gguf_q4_0'
|