- Add intelligent-router.sh hook for automatic agent routing - Add AUTO-TRIGGER-SUMMARY.md documentation - Add FINAL-INTEGRATION-SUMMARY.md documentation - Complete Prometheus integration (6 commands + 4 tools) - Complete Dexto integration (12 commands + 5 tools) - Enhanced Ralph with access to all agents - Fix /clawd command (removed disable-model-invocation) - Update hooks.json to v5 with intelligent routing - 291 total skills now available - All 21 commands with automatic routing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
52 lines
1.4 KiB
Python
52 lines
1.4 KiB
Python
import shutil
|
|
import tempfile
|
|
from pathlib import Path
|
|
|
|
import pytest
|
|
|
|
from prometheus.docker.user_defined_container import UserDefinedContainer
|
|
|
|
|
|
@pytest.fixture
|
|
def temp_project_dir():
|
|
# Create a temporary directory with some test files
|
|
temp_dir = Path(tempfile.mkdtemp())
|
|
test_file = temp_dir / "test.txt"
|
|
test_file.write_text("test content")
|
|
|
|
yield temp_dir
|
|
|
|
# Cleanup
|
|
shutil.rmtree(temp_dir)
|
|
|
|
|
|
@pytest.fixture
|
|
def container(temp_project_dir):
|
|
return UserDefinedContainer(
|
|
temp_project_dir,
|
|
"/app",
|
|
"FROM python:3.9\nWORKDIR /app\nCOPY . /app/",
|
|
None,
|
|
["pip install -r requirements.txt", "python setup.py build"],
|
|
["pytest tests/"],
|
|
)
|
|
|
|
|
|
def test_initialization(container, temp_project_dir):
|
|
"""Test that the container is initialized correctly"""
|
|
assert isinstance(container.tag_name, str)
|
|
assert container.tag_name.startswith("prometheus_user_defined_container_")
|
|
assert container.project_path != temp_project_dir
|
|
assert (container.project_path / "test.txt").exists()
|
|
|
|
|
|
def test_get_dockerfile_content(container):
|
|
dockerfile_content = container.get_dockerfile_content()
|
|
|
|
assert dockerfile_content
|
|
|
|
# Check for key elements in the Dockerfile
|
|
assert "FROM python:3.9" in dockerfile_content
|
|
assert "WORKDIR /app" in dockerfile_content
|
|
assert "COPY . /app/" in dockerfile_content
|