Major fixes: - Fixed Claude Code verification (was checking 'claude-code', now checks 'claude') - Fixed volume mount paths (use absolute path /tmp/claude-repo for runtime) - Fixed agents copy path (removed incorrect /agents/ subdirectory) - Fixed critical agent paths (studio-coach in bonus/, not project-management) - Added expect package for interactive installer automation - Fixed test count aggregation to read from individual result files Test Results (after fixes): ✅ Manual Installation: 27/27 passing (100%) ✅ Master Prompt Installation: 15/15 passing (100%) ⚠️ Interactive Installer: 7/13 passing (54% - expect automation issue) Note: Interactive installer works fine for manual testing, just difficult to automate with expect scripts due to prompt matching complexity.
71 lines
1.8 KiB
Docker
71 lines
1.8 KiB
Docker
# 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 (excluding nodejs and npm)
|
|
RUN apt-get update && apt-get install -y \
|
|
curl \
|
|
wget \
|
|
git \
|
|
build-essential \
|
|
python3 \
|
|
python3-pip \
|
|
jq \
|
|
vim \
|
|
bash \
|
|
ca-certificates \
|
|
gnupg \
|
|
expect \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install Node.js 20.x from official NodeSource repository
|
|
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
|
|
apt-get install -y nodejs && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
# 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
|
|
|
|
# Copy repository files (relative to build context)
|
|
COPY --chown=testuser:testuser ../../../ /home/testuser/claude-code-glm-suite/
|
|
|
|
# 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}
|
|
|
|
# Make repository scripts executable
|
|
RUN chmod +x /home/testuser/claude-code-glm-suite/interactive-install-claude.sh 2>/dev/null || true
|
|
RUN chmod +x /home/testuser/claude-code-glm-suite/verify-claude-setup.sh 2>/dev/null || true
|
|
|
|
# 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"]
|