Files
claude-code-glm-suite/docker/test-env
uroma 8014ad0bcc Fix Docker tests to achieve 100% on 2/3 installation methods
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.
8014ad0bcc · 2026-01-16 10:54:31 +00:00
History
..
2026-01-16 10:45:39 +00:00

Claude Code Suite - Docker Test Environment

This Docker environment tests all three installation methods for the Claude Code Suite to ensure error-free, fully working outcomes.

🚀 Quick Start

# Build the test environment
cd docker/test-env
docker-compose build

# Run all tests
docker-compose up

# View results
docker-compose run verify-all
cat test-results/final-report-*.txt

📋 What Gets Tested

Three Installation Methods:

  1. Option 1: Master Prompt Installation

    • Copies MASTER-PROMPT.md instructions
    • Executes each step automatically
    • Verifies all components installed
  2. Option 2: Interactive Installer

    • Runs interactive-install-claude.sh
    • Uses expect script to automate responses
    • Tests all installation options
  3. Option 3: Manual Installation

    • Executes each step manually
    • Tests individual commands
    • Verifies each component separately

Components Verified:

  • Prerequisites - Node.js, npm, Python, Git, jq
  • Claude Code - Installation and version
  • Settings Files - settings.json, settings.local.json
  • Agents - 38 agents across 8 departments
  • MCP Tools - @z_ai/mcp-server, @z_ai/coding-helper, llm-tldr
  • UI/UX Pro Max - Skill installation
  • Ralph CLI (Optional) - Hook script and configuration

📁 Test Suite Structure

docker/test-env/
├── Dockerfile                    # Base Docker image
├── docker-compose.yml            # Orchestration of test containers
├── README.md                     # This file
└── test-suite/
    ├── common.sh                 # Shared utilities and verification functions
    ├── test-interactive-install.sh       # Test Option 2
    ├── test-master-prompt-install.sh      # Test Option 1
    ├── test-manual-install.sh             # Test Option 3
    └── verify-all-installations.sh        # Master verification script

🔧 Running Individual Tests

Test Interactive Installer Only:

docker-compose run --rm test-interactive

Test Master Prompt Only:

docker-compose run --rm test-master-prompt

Test Manual Installation Only:

docker-compose run --rm test-manual

Run All Tests:

docker-compose up verify-all

📊 Test Results

Results are saved to docker/test-env/test-results/:

  • test-YYYYMMDD-HHMMSS.log - Detailed test logs
  • interactive-install-results.txt - Interactive installer results
  • master-prompt-install-results.txt - Master prompt results
  • manual-install-results.txt - Manual installation results
  • test-counts.txt - Component verification counts
  • final-report-YYYYMMDD-HHMMSS.txt - Comprehensive final report

🎯 Test Verification Matrix

Each test verifies the following components:

Component Interactive Master Prompt Manual
Prerequisites
Claude Code
Settings Files
Agents (38)
MCP Tools
UI/UX Skill
Ralph CLI ⚠️ (skipped) ⚠️ (skipped) ⚠️ (skipped)

⚠️ = Optional/Skipped to keep tests simple

🐛 Troubleshooting

Container fails to build:

# Check build logs
docker-compose build --no-cache

# Verify Docker is running
docker ps

Tests fail with network errors:

# Check network connectivity
docker-compose run test-interactive ping -c 3 github.com

# Check DNS
docker-compose run test-interactive cat /etc/resolv.conf

Permission errors:

# Fix script permissions
chmod +x docker/test-env/test-suite/*.sh

# Rebuild
docker-compose build --no-cache

🔄 Clean Up

# Stop all containers
docker-compose down

# Remove test results
rm -rf docker/test-env/test-results/

# Remove built images
docker-compose down --rmi all

📝 Customization

Modify test timeout:

Edit docker-compose.yml and add:

environment:
  - TEST_TIMEOUT=600

Test with Ralph CLI:

Set environment variable:

export TEST_RALPH=true
docker-compose run test-interactive

Use different Node.js version:

Edit Dockerfile and change:

ENV NODE_VERSION=18  # or 20, or latest

Success Criteria

A successful test run should show:

✅ All installation methods tested successfully
Total Installation Methods Tested: 3
Passed: 3
Failed: 0

✅ ALL INSTALLATION METHODS TESTED SUCCESSFULLY
Recommendation: All installation methods are PRODUCTION READY

📞 Support

If tests fail:

  1. Check individual test logs in test-results/
  2. Review error messages in the final report
  3. Verify network connectivity to GitHub
  4. Ensure Docker has sufficient resources (memory, disk)

🎉 Summary

This Docker test environment provides comprehensive validation of all three installation methods in isolated, reproducible containers. Each test runs from a clean slate and verifies all components are properly installed and functional.