vendor_report/test_docker.ps1
2025-11-07 02:42:28 +04:00

27 lines
1.1 KiB
PowerShell

# Simple Docker test script
Write-Host "=== Testing Docker Image ===" -ForegroundColor Cyan
Write-Host "`n1. Testing local file..." -ForegroundColor Yellow
python test_syntax.py
Write-Host "`n2. Building Docker image..." -ForegroundColor Yellow
docker build --no-cache -t vendor-report-api-test . 2>&1 | Select-String "Step|COPY|ERROR" | Select-Object -Last 5
Write-Host "`n3. Checking line 794 in LOCAL file:" -ForegroundColor Yellow
Get-Content html_generator.py | Select-Object -Index 793
Write-Host "`n4. Checking line 794 in DOCKER image:" -ForegroundColor Yellow
docker run --rm vendor-report-api-test sed -n '794p' /app/html_generator.py 2>&1
Write-Host "`n5. Checking line 1284 in LOCAL file:" -ForegroundColor Yellow
Get-Content html_generator.py | Select-Object -Index 1283
Write-Host "`n6. Checking line 1284 in DOCKER image:" -ForegroundColor Yellow
docker run --rm vendor-report-api-test sed -n '1284p' /app/html_generator.py 2>&1
Write-Host "`n7. Testing Python import in Docker:" -ForegroundColor Yellow
docker run --rm vendor-report-api-test python -c "import html_generator; print('SUCCESS')" 2>&1
Write-Host "`n=== Done ===" -ForegroundColor Cyan