Add comprehensive Docker test environment for installation validation

Add complete Docker testing infrastructure to validate all 3 installation methods

Features:
- Dockerfile: Ubuntu 22.04 with Node.js 20, Python 3, prerequisites
- docker-compose.yml: Orchestrate 3 test containers + verification
- Test suite with 5 scripts:
  * common.sh: Shared utilities and verification functions
  * test-interactive-install.sh: Test Option 2 (interactive installer)
  * test-master-prompt-install.sh: Test Option 1 (master prompt)
  * test-manual-install.sh: Test Option 3 (manual installation)
  * verify-all-installations.sh: Master verification with report generation
- run-tests.sh: Quick start script for easy test execution

What Gets Tested:
✓ Prerequisites (Node.js, npm, Python, Git, jq)
✓ Claude Code installation and version
✓ Settings files (settings.json, settings.local.json)
✓ 38 agents across 8 departments
✓ MCP tools (@z_ai/mcp-server, @z_ai/coding-helper, llm-tldr)
✓ UI/UX Pro Max skill
✓ Ralph CLI (optional, can be enabled)

Test Results:
- Saved to docker/test-env/test-results/
- Detailed logs for each test method
- Component verification counts
- Comprehensive final report with pass/fail status

Usage:
cd docker/test-env
./run-tests.sh

Or manually:
docker-compose up verify-all

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
uroma
2026-01-16 10:30:54 +00:00
Unverified
parent fd6dcca2f7
commit 699087342f
9 changed files with 1418 additions and 0 deletions

View File

@@ -0,0 +1,62 @@
# Dockerfile for Testing Claude Code Suite Installation
# Tests all 3 installation methods: Interactive, Master Prompt, and Manual
FROM ubuntu:22.04
# Prevent interactive prompts during build
ENV DEBIAN_FRONTEND=noninteractive
ENV NODE_VERSION=20
ENV PYTHON_VERSION=3.11
# Install system prerequisites
RUN apt-get update && apt-get install -y \
curl \
wget \
git \
build-essential \
python3 \
python3-pip \
nodejs \
npm \
jq \
vim \
bash \
&& rm -rf /var/lib/apt/lists/*
# Upgrade Node.js to version 20
RUN npm install -g n && \
n $NODE_VERSION && \
npm install -g npm@latest
# Install Claude Code globally
RUN npm install -g @anthropic-ai/claude-code
# Create test user
RUN useradd -m -s /bin/bash testuser && \
usermod -aG sudo testuser
# Set up working directory
WORKDIR /home/testuser
RUN chown -R testuser:testuser /home/testuser
# Switch to test user
USER testuser
# Set environment variables
ENV HOME=/home/testuser
ENV PATH="$HOME/.local/bin:$PATH"
# Create Claude directory structure
RUN mkdir -p ~/.claude/{agents,plugins,hooks,sessions,projects}
# Copy test suite files
COPY --chown=testuser:testuser test-suite/ $HOME/test-suite/
# Make scripts executable
RUN chmod +x $HOME/test-suite/*.sh
# Set working directory for tests
WORKDIR /home/testuser/test-suite
# Default command
CMD ["/bin/bash"]