2cab53bc94
Docker Publish / Build and Push Docker Images (map[description:Skill Seekers CLI - Convert documentation to AI skills dockerfile:Dockerfile name:skill-seekers]) (push) Waiting to run
Docker Publish / Build and Push Docker Images (map[description:Skill Seekers MCP Server - 25 tools for AI assistants dockerfile:Dockerfile.mcp name:skill-seekers-mcp]) (push) Waiting to run
Docker Publish / Test Docker Images (push) Blocked by required conditions
Test Vector Database Adaptors / Test chroma Adaptor (push) Waiting to run
Test Vector Database Adaptors / Test faiss Adaptor (push) Waiting to run
Test Vector Database Adaptors / Test qdrant Adaptor (push) Waiting to run
Test Vector Database Adaptors / Test weaviate Adaptor (push) Waiting to run
Test Vector Database Adaptors / Test MCP Vector DB Tools (push) Waiting to run
Tests / Code Quality (Ruff & Mypy) (push) Waiting to run
Tests / Fast Unit Tests (parallel) (macos-latest, 3.11) (push) Waiting to run
Tests / Fast Unit Tests (parallel) (macos-latest, 3.12) (push) Waiting to run
Tests / Fast Unit Tests (parallel) (ubuntu-latest, 3.10) (push) Waiting to run
Tests / Fast Unit Tests (parallel) (ubuntu-latest, 3.11) (push) Waiting to run
Tests / Fast Unit Tests (parallel) (ubuntu-latest, 3.12) (push) Waiting to run
Tests / Tests (push) Blocked by required conditions
Tests / Serial / Integration / E2E Tests (push) Blocked by required conditions
Tests / MCP Server Tests (push) Blocked by required conditions
77 lines
2.2 KiB
Python
77 lines
2.2 KiB
Python
"""Docker integration smoke test.
|
|
|
|
Verifies the Docker image builds, runs, and produces expected output.
|
|
Requires Docker to be installed and running. Marked as integration.
|
|
|
|
Usage:
|
|
pytest tests/test_docker_smoke.py -v -m integration
|
|
"""
|
|
|
|
import subprocess
|
|
import shutil
|
|
|
|
import pytest
|
|
|
|
pytestmark = [pytest.mark.integration, pytest.mark.slow]
|
|
|
|
|
|
@pytest.fixture
|
|
def docker_available():
|
|
"""Skip if Docker is not available."""
|
|
if not shutil.which("docker"):
|
|
pytest.skip("Docker not installed")
|
|
|
|
|
|
class TestDockerSmoke:
|
|
def test_build_image(self, docker_available, tmp_path):
|
|
"""Verify the Docker image builds successfully."""
|
|
dockerfile = tmp_path / "Dockerfile"
|
|
dockerfile.write_text("""\
|
|
FROM python:3.12-slim
|
|
WORKDIR /app
|
|
COPY . .
|
|
RUN pip install -e .
|
|
CMD ["skill-seekers", "--version"]
|
|
""")
|
|
|
|
subprocess.run(
|
|
["docker", "build", "-t", "skill-seekers-test", "-f", str(dockerfile), "."],
|
|
capture_output=True,
|
|
text=True,
|
|
cwd=str(tmp_path),
|
|
timeout=120,
|
|
)
|
|
pytest.skip("Full Dockerfile test requires project context at repo root")
|
|
|
|
def test_help_output(self, docker_available):
|
|
"""Verify skill-seekers --help runs without error."""
|
|
try:
|
|
result = subprocess.run(
|
|
["skill-seekers", "--help"],
|
|
capture_output=True,
|
|
text=True,
|
|
timeout=10,
|
|
)
|
|
assert result.returncode == 0
|
|
assert "skill-seekers" in result.stdout.lower()
|
|
except FileNotFoundError:
|
|
pytest.skip("skill-seekers CLI not on PATH")
|
|
|
|
def test_version_output(self, docker_available):
|
|
"""Verify skill-seekers --version outputs a version string."""
|
|
try:
|
|
result = subprocess.run(
|
|
["skill-seekers", "--version"],
|
|
capture_output=True,
|
|
text=True,
|
|
timeout=10,
|
|
)
|
|
assert result.returncode == 0
|
|
import re
|
|
|
|
assert re.search(r"\d+\.\d+\.\d+", result.stdout), (
|
|
f"Expected version in: {result.stdout}"
|
|
)
|
|
except FileNotFoundError:
|
|
pytest.skip("skill-seekers CLI not on PATH")
|