2 lines
15 KiB
Markdown
Raw Normal View History

# Integration Testing Suite\n\n**Version**: 1.0.0\n**Status**: ✅ Complete\n**Test Coverage**: 140 tests across 4 modes, 15+ services\n\n---\n\n## Overview\n\nThis directory contains the comprehensive integration testing suite for the provisioning platform. Tests validate all four execution modes (solo, multi-user, CI/CD, enterprise) with full service integration, workflow testing, and end-to-end scenarios.\n\n**Key Features**:\n\n- ✅ **4 Execution Modes**: Solo, Multi-User, CI/CD, Enterprise\n- ✅ **15+ Services**: Orchestrator, CoreDNS, Gitea, OCI registries, PostgreSQL, Prometheus, etc.\n- ✅ **OrbStack Integration**: Deployable to isolated OrbStack machine\n- ✅ **Parallel Execution**: Run tests in parallel for speed\n- ✅ **Multiple Report Formats**: JUnit XML, HTML, JSON\n- ✅ **Automatic Cleanup**: Resources cleaned up after tests\n\n---\n\n## Quick Start\n\n### 1. Prerequisites\n\n```\n# Install OrbStack\nbrew install --cask orbstack\n\n# Create OrbStack machine\norb create provisioning --cpu 4 --memory 8192 --disk 100\n\n# Verify machine is running\norb status provisioning\n```\n\n### 2. Run Tests\n\n```\n# Run all tests for solo mode\nnu provisioning/tests/integration/framework/test_runner.nu --mode solo\n\n# Run all tests for all modes\nnu provisioning/tests/integration/framework/test_runner.nu\n\n# Run with HTML report\nnu provisioning/tests/integration/framework/test_runner.nu --report test-report.html\n```\n\n### 3. View Results\n\n```\n# View JUnit report\ncat /tmp/provisioning-test-reports/junit-results.xml\n\n# View HTML report\nopen test-report.html\n\n# View logs\ncat /tmp/provisioning-test.log\n```\n\n---\n\n## Directory Structure\n\n```\nprovisioning/tests/integration/\n├── README.md # This file\n├── test_config.yaml # Test configuration\n├── setup_test_environment.nu # Environment setup\n├── teardown_test_environment.nu # Cleanup script\n├── framework/ # Test framework\n│ ├── test_helpers.nu # Common utilities (400 lines)\n│ ├── orbstack_helpers.nu # OrbStack integration (250 lines)\n│ └── test_runner.nu # Test orchestrator (500 lines)\n├── modes/ # Mode-specific tests\n│ ├── test_solo_mode.nu # Solo mode (400 lines, 8 tests)\n│ ├── test_multiuser_mode.nu # Multi-user (500 lines, 10 tests)\n│ ├── test_cicd_mode.nu # CI/CD (450 lines, 8 tests)\n│ └── test_enterprise_mode.nu # Enterprise (600 lines, 6 tests)\n├── services/ # Service integration tests\n│ ├── test_dns_integration.nu # CoreDNS (300 lines, 8 tests)\n│ ├── test_gitea_integration.nu # Gitea (350 lines, 10 tests)\n│ ├── test_oci_integration.nu # OCI registries (400 lines, 12 tests)\n│ └── test_service_orchestration.nu # Service manager (350 lines, 10 tests)\n├── workflows/ # Workflow tests\n│ ├── test_extension_loading.nu # Extension loading (400 lines, 12 tests)\n│ └── test_batch_workflows.nu # Batch workflows (500 lines, 12 tests)\n├── e2e/ # End-to-end tests\n│ ├── test_complete_deployment.nu # Full deployment (600 lines, 6 tests)\n│ └── test_disaster_recovery.nu # Backup/restore (400 lines, 6 tests)\n├── performance/ # Performance tests\n│ ├── test_concurrency.nu # Concurrency (350 lines, 6 tests)\n│ └── test_scalability.nu # Scalability (300 lines, 6 tests)\n├── security/ # Security tests\n│ ├── test_rbac_enforcement.nu # RBAC (400 lines, 10 tests)\n│ └── test_kms_integration.nu # KMS (300 lines, 5 tests)\n└── docs/ # Documen