Michel / test.bat
Nanny7's picture
Add user profile page with account, billing, and settings
202d151
Raw History Blame Contribute Delete
2.78 kB
@echo off
setlocal
title Montaigne - Local Tests
set "APP=%~dp0"
set "PASS=0"
set "FAIL=0"
set "SKIP=0"
echo.
echo ═══════════════════════════════════════════════════════════
echo Montaigne - Running local tests
echo ═══════════════════════════════════════════════════════════
echo.
REM ── Activate venv if available ─────────────────────────────
if exist "%APP%venv\Scripts\activate.bat" (
call "%APP%venv\Scripts\activate.bat"
)
REM ── Test 1: DB smoke test (uses local SQLite, no DB needed) ─
echo [1/3] Database + Auth smoke test...
echo.
python "%APP%test_db.py"
if errorlevel 1 (
echo [FAIL] DB smoke test
set /a FAIL+=1
) else (
set /a PASS+=1
)
echo.
echo ───────────────────────────────────────────────────────────
echo.
REM ── Test 2: API connectivity (needs ATLASCLOUD_API_KEY) ────
echo [2/3] LLM API connectivity test...
echo.
python "%APP%check_api.py"
if errorlevel 1 (
echo [FAIL] API test
set /a FAIL+=1
) else (
set /a PASS+=1
)
echo.
echo ───────────────────────────────────────────────────────────
echo.
REM ── Test 3: Server health check (needs DB + API keys) ─────
echo [3/3] Server health check...
echo.
python "%APP%check_server.py"
if errorlevel 1 (
echo [FAIL] Server health check
set /a FAIL+=1
) else (
set /a PASS+=1
)
echo.
echo ───────────────────────────────────────────────────────────
echo.
REM ── Summary ───────────────────────────────────────────────
set /a TOTAL=%PASS%+%FAIL%
echo ═══════════════════════════════════════════════════════════
echo Results: %PASS%/%TOTAL% passed
if %FAIL% GTR 0 (
echo %FAIL% FAILED
) else (
echo All tests passed!
)
echo ═══════════════════════════════════════════════════════════
echo.
pause
exit /b %FAIL%