mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-09 05:35:21 +09:00
- Reorganize v3/ into implementation/ subfolders: - planning/, architecture/, migration/, integration/ - security/, adrs/, research/, swarm-plans/ - Add 15-agent concurrent swarm implementation plans: - SWARM-OVERVIEW.md: Hierarchical mesh topology, 4 phases - AGENT-SPECIFICATIONS.md: 15 agent configs with capabilities - TDD-LONDON-SCHOOL-PLAN.md: Mock-first TDD methodology - BENCHMARK-OPTIMIZATION.md: Performance targets (2.49x-7.47x) - DEPLOYMENT-PLAN.md: Release strategy, CI/CD, rollback - GITHUB-ISSUE-TRACKING.md: Issue workflow with agent replies - Update .claude/settings.json with proper hooks format - Add bash aliases for claude --dangerously-skip-permissions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Docker Validation Suite for Claude-Flow
This directory contains Docker-based testing infrastructure to validate claude-flow functionality in a clean, isolated environment that simulates a remote deployment.
🎯 Purpose
- Clean Environment Testing: Validates installation in a fresh environment without local dependencies
- Production Simulation: Tests the actual user experience of installing and using claude-flow
- CI/CD Integration: Can be used in automated testing pipelines
- Cross-Platform Validation: Tests on Linux (Alpine) to ensure portability
📁 Files
Dockerfile.test- Main test container with Node 18 and required dependenciesdocker-compose.test.yml- Multi-container setup for integration testingrun-validation.sh- Comprehensive validation script (50+ tests)README.md- This file
🚀 Quick Start
Option 1: Build and Run Validation (Recommended)
# From project root
cd tests/docker
# Build the test container
docker build -f Dockerfile.test -t claude-flow-test ../..
# Run validation suite
docker run --rm claude-flow-test sh -c "cd /home/testuser && tests/docker/run-validation.sh"
Option 2: Interactive Testing
# Start container with docker-compose
docker-compose -f docker-compose.test.yml up -d
# Enter the container
docker exec -it claude-flow-test sh
# Inside container, run tests
cd /home/testuser
./tests/docker/run-validation.sh
# Or test individual commands
./bin/claude-flow --help
./bin/claude-flow memory store test "value"
./bin/claude-flow agent agents
Option 3: Full Integration Test Suite
# Start all services (including SQLite)
docker-compose -f docker-compose.test.yml up -d
# Run integration tests
docker-compose -f docker-compose.test.yml exec claude-flow-integration \
sh -c "cd /home/testuser && ./tests/docker/run-validation.sh"
# Clean up
docker-compose -f docker-compose.test.yml down -v
🧪 Test Coverage
The validation suite tests:
Phase 1: Installation & Build
- ✅ NPM and Node.js versions
- ✅ Build completion
- ✅ Binary generation
Phase 2: CLI Basic Commands
- ✅ Help command
- ✅ Version command
- ✅ Agent help
Phase 3: Memory Commands (Basic Mode)
- ✅ Memory store
- ✅ Memory query
- ✅ Memory stats
- ✅ Memory list
- ✅ Memory export/import
Phase 4: ReasoningBank Commands
- ✅ Mode detection
- ✅ Mode configuration
- ✅ Status display
Phase 5: Agent Commands
- ✅ Agent listing
- ✅ Agent info
- ✅ Agent configuration
Phase 6: Proxy Commands
- ✅ Proxy help
- ✅ Proxy configuration
- ✅ OpenRouter integration
Phase 7: Help System
- ✅ Main help with all features
- ✅ Agent help with memory
- ✅ Feature discoverability
Phase 8: Security Features
- ✅ API key redaction
- ✅ Secure storage
- ✅ Redacted queries
Phase 9: File Structure
- ✅ Memory directory creation
- ✅ Memory store file
- ✅ Proper permissions
Phase 10: Integration Tests
- ✅ Import/export workflows
- ✅ Namespace operations
- ✅ Error handling
📊 Expected Output
🐳 Claude-Flow Docker Validation Suite
========================================
📦 Phase 1: Installation & Build
--------------------------------
Testing: NPM install... ✓ PASS
Testing: Node version... ✓ PASS
Testing: Build completed... ✓ PASS
Testing: Binary exists... ✓ PASS
🔧 Phase 2: CLI Basic Commands
------------------------------
Testing: Help command... ✓ PASS
...
========================================
📊 Test Results Summary
========================================
Total Tests: 50
Passed: 50
Failed: 0
✅ All tests passed!
🚀 Claude-Flow is ready for production release
🔧 Troubleshooting
Issue: Build fails in Docker
# Clean build
docker build --no-cache -f Dockerfile.test -t claude-flow-test ../..
Issue: Permission errors
# The Dockerfile uses a non-root user (testuser)
# This is intentional to simulate real user environment
# If you need root, modify the Dockerfile
Issue: Tests timeout
# Increase timeout in validation script
# Or run specific test phases individually
docker exec -it claude-flow-test ./bin/claude-flow --help
🎯 CI/CD Integration
GitHub Actions Example
name: Docker Validation
on: [push, pull_request]
jobs:
docker-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build test container
run: |
cd tests/docker
docker build -f Dockerfile.test -t claude-flow-test ../..
- name: Run validation suite
run: |
docker run --rm claude-flow-test \
sh -c "cd /home/testuser && tests/docker/run-validation.sh"
📝 Adding New Tests
To add new validation tests, edit run-validation.sh:
test_command "Your test description" \
"./bin/claude-flow your-command" \
"expected-output-pattern"
🌐 Multi-Platform Testing
# Build for multiple platforms
docker buildx build --platform linux/amd64,linux/arm64 \
-f Dockerfile.test -t claude-flow-test ../..
🔒 Security Testing
The validation suite includes security tests:
- API key redaction
- Secure storage validation
- Permission checks
📚 Related Documentation
🤝 Contributing
When adding new features to claude-flow:
- Add corresponding tests to
run-validation.sh - Update the test coverage section in this README
- Run full validation suite before submitting PR
📞 Support
For issues with Docker validation:
- Check Docker logs:
docker logs claude-flow-test - Review test output for specific failures
- Open issue on GitHub with validation output