Files
michaelschiemer/tests/debug/test-vite-integration.php
Michael Schiemer fc3d7e6357 feat(Production): Complete production deployment infrastructure
- Add comprehensive health check system with multiple endpoints
- Add Prometheus metrics endpoint
- Add production logging configurations (5 strategies)
- Add complete deployment documentation suite:
  * QUICKSTART.md - 30-minute deployment guide
  * DEPLOYMENT_CHECKLIST.md - Printable verification checklist
  * DEPLOYMENT_WORKFLOW.md - Complete deployment lifecycle
  * PRODUCTION_DEPLOYMENT.md - Comprehensive technical reference
  * production-logging.md - Logging configuration guide
  * ANSIBLE_DEPLOYMENT.md - Infrastructure as Code automation
  * README.md - Navigation hub
  * DEPLOYMENT_SUMMARY.md - Executive summary
- Add deployment scripts and automation
- Add DEPLOYMENT_PLAN.md - Concrete plan for immediate deployment
- Update README with production-ready features

All production infrastructure is now complete and ready for deployment.
2025-10-25 19:18:37 +02:00

75 lines
2.2 KiB
PHP

<?php
declare(strict_types=1);
require_once __DIR__ . '/../../vendor/autoload.php';
use App\Framework\Process\Services\TcpPortCheckService;
echo "=== Vite Integration Test ===\n\n";
// Test 1: TcpPortCheckService
echo "1. Testing TcpPortCheckService\n";
echo " - Testing localhost:3000 (HTTP)...\n";
$portCheck = new TcpPortCheckService();
// Test HTTP localhost:3000
$isOpen = $portCheck->isPortOpen('localhost', 3000, 2);
echo " Result: " . ($isOpen ? "✅ OPEN" : "❌ CLOSED") . "\n\n";
// Test HTTPS localhost:3000
echo " - Testing localhost:3000 (HTTPS/SSL)...\n";
$isSslOpen = $portCheck->isSslPortOpen('localhost', 3000, 2);
echo " Result: " . ($isSslOpen ? "✅ OPEN" : "❌ CLOSED") . "\n\n";
// Test 2: Different hosts
echo "2. Testing different host configurations\n";
$hosts = [
'localhost' => 3000,
'127.0.0.1' => 3000,
'host.docker.internal' => 3000,
];
foreach ($hosts as $host => $port) {
echo " - Testing {$host}:{$port}...\n";
$result = $portCheck->isPortOpen($host, $port, 2);
echo " Result: " . ($result ? "✅ OPEN" : "❌ CLOSED") . "\n";
}
echo "\n";
// Test 3: Test some known open ports
echo "3. Testing known open ports (sanity check)\n";
echo " - Testing localhost:80 (Nginx)...\n";
$nginx = $portCheck->isPortOpen('localhost', 80, 2);
echo " Result: " . ($nginx ? "✅ OPEN" : "❌ CLOSED") . "\n";
echo " - Testing localhost:443 (Nginx HTTPS)...\n";
$nginxSsl = $portCheck->isSslPortOpen('localhost', 443, 2);
echo " Result: " . ($nginxSsl ? "✅ OPEN" : "❌ CLOSED") . "\n\n";
// Test 4: Parse URL test
echo "4. Testing URL parsing (Vite config)\n";
$testUrls = [
'https://localhost:3000',
'https://host.docker.internal:3000',
'http://127.0.0.1:3000',
];
foreach ($testUrls as $url) {
echo " - Parsing: {$url}\n";
$parsed = parse_url($url);
if ($parsed !== false) {
$host = $parsed['host'] ?? 'N/A';
$port = $parsed['port'] ?? ($parsed['scheme'] === 'https' ? 443 : 80);
$scheme = $parsed['scheme'] ?? 'http';
echo " Host: {$host}, Port: {$port}, Scheme: {$scheme}\n";
} else {
echo " ❌ Failed to parse\n";
}
}
echo "\n=== Test Complete ===\n";