|
36 | 36 | "Bash(git fetch:*)", |
37 | 37 | "Bash(git push:*)", |
38 | 38 | "Bash(gh auth:*)", |
39 | | - "Bash(VIDEOANNOTATOR_DB_PATH=\"test_logging_db.db\" uv run python -c \"\nimport subprocess\nimport time\nimport requests\n\n# Start server in background\nserver_process = subprocess.Popen(\n [''uv'', ''run'', ''python'', ''api_server.py'', ''--port'', ''8003'', ''--log-level'', ''info''],\n env={''VIDEOANNOTATOR_DB_PATH'': ''test_logging_db.db''}\n)\n\ntry:\n # Wait for server to start\n time.sleep(4)\n \n print(''[TEST] Testing API requests with logging...'')\n \n # Test health endpoint (excluded from request logging)\n response = requests.get(''http://localhost:8003/health'', timeout=5)\n print(f''[TEST] Health check: {response.status_code}'')\n \n # Test debug endpoint (should be logged)\n response = requests.get(''http://localhost:8003/api/v1/debug/server-info'', timeout=5)\n print(f''[TEST] Debug endpoint: {response.status_code}'')\n \n # Test with authentication (should be logged with user info)\n headers = {''Authorization'': ''Bearer dev-token''}\n response = requests.get(''http://localhost:8003/api/v1/debug/token-info'', headers=headers, timeout=5)\n print(f''[TEST] Authenticated request: {response.status_code}'')\n \n # Test invalid endpoint (should generate 404 and be logged)\n response = requests.get(''http://localhost:8003/api/v1/nonexistent'', timeout=5)\n print(f''[TEST] Invalid endpoint: {response.status_code}'')\n \n print(''[TEST] API requests completed'')\n \nfinally:\n # Clean up\n server_process.terminate()\n server_process.wait()\n print(''[TEST] Server stopped'')\n\")" |
| 39 | + "Bash(VIDEOANNOTATOR_DB_PATH=\"test_logging_db.db\" uv run python -c \"\nimport subprocess\nimport time\nimport requests\n\n# Start server in background\nserver_process = subprocess.Popen(\n [''uv'', ''run'', ''python'', ''api_server.py'', ''--port'', ''8003'', ''--log-level'', ''info''],\n env={''VIDEOANNOTATOR_DB_PATH'': ''test_logging_db.db''}\n)\n\ntry:\n # Wait for server to start\n time.sleep(4)\n \n print(''[TEST] Testing API requests with logging...'')\n \n # Test health endpoint (excluded from request logging)\n response = requests.get(''http://localhost:8003/health'', timeout=5)\n print(f''[TEST] Health check: {response.status_code}'')\n \n # Test debug endpoint (should be logged)\n response = requests.get(''http://localhost:8003/api/v1/debug/server-info'', timeout=5)\n print(f''[TEST] Debug endpoint: {response.status_code}'')\n \n # Test with authentication (should be logged with user info)\n headers = {''Authorization'': ''Bearer dev-token''}\n response = requests.get(''http://localhost:8003/api/v1/debug/token-info'', headers=headers, timeout=5)\n print(f''[TEST] Authenticated request: {response.status_code}'')\n \n # Test invalid endpoint (should generate 404 and be logged)\n response = requests.get(''http://localhost:8003/api/v1/nonexistent'', timeout=5)\n print(f''[TEST] Invalid endpoint: {response.status_code}'')\n \n print(''[TEST] API requests completed'')\n \nfinally:\n # Clean up\n server_process.terminate()\n server_process.wait()\n print(''[TEST] Server stopped'')\n\")", |
| 40 | + "Bash(VIDEOANNOTATOR_DB_PATH=\"test_background_db.db\" uv run python -c \"\nimport subprocess\nimport time\nimport requests\n\nprint(''[TEST] Starting API server with integrated background processing...'')\n\n# Start server with test database\nserver_process = subprocess.Popen(\n [''uv'', ''run'', ''python'', ''api_server.py'', ''--port'', ''8001'', ''--log-level'', ''info''],\n env={''VIDEOANNOTATOR_DB_PATH'': ''test_background_db.db''}\n)\n\ntry:\n # Wait for server to start\n time.sleep(6)\n \n print(''[TEST] Testing server health...'')\n response = requests.get(''http://localhost:8001/health'', timeout=5)\n if response.status_code == 200:\n print(f''[OK] Server healthy: {response.json()}'')\n else:\n print(f''[ERROR] Health check failed: {response.status_code}'')\n \n print(''[TEST] Testing background jobs status...'')\n response = requests.get(''http://localhost:8001/api/v1/debug/background-jobs'', timeout=5)\n if response.status_code == 200:\n bg_status = response.json()\n print(f''[OK] Background processing status: {bg_status}'')\n else:\n print(f''[ERROR] Background jobs status failed: {response.status_code}'')\n \n print(''[TEST] Server started successfully - checking logs for errors'')\n\nfinally:\n # Clean up\n server_process.terminate()\n server_process.wait()\n print(''[CLEANUP] Server stopped'')\n\")", |
| 41 | + "Bash(VIDEOANNOTATOR_DB_PATH=\"test_background_db.db\" uv run python api_server.py --port 8001 --log-level info)", |
| 42 | + "Bash(VIDEOANNOTATOR_DB_PATH=\"test_refactored_db.db\" uv run python -c \"\nimport subprocess\nimport time\nimport requests\n\nprint(''[TEST] Testing refactored job processing system...'')\n\n# Start server with test database\nserver_process = subprocess.Popen(\n [''uv'', ''run'', ''python'', ''api_server.py'', ''--port'', ''8004'', ''--log-level'', ''info''],\n env={''VIDEOANNOTATOR_DB_PATH'': ''test_refactored_db.db''}\n)\n\ntry:\n # Wait for server to start\n time.sleep(4)\n \n # Test job submission\n test_content = b''fake video content for testing''\n files = {''video'': (''test_video.mp4'', test_content, ''video/mp4'')}\n data = {''selected_pipelines'': ''scene,person''}\n \n response = requests.post(''http://localhost:8004/api/v1/jobs/'', files=files, data=data, timeout=10)\n \n print(f''Job submission status: {response.status_code}'')\n if response.status_code == 201:\n job_data = response.json()\n job_id = job_data[''id'']\n print(f''Job created successfully! ID: {job_id}'')\n print(f''Status: {job_data[\"\"status\"\"]}'')\n print(f''Pipelines: {job_data[\"\"selected_pipelines\"\"]}'')\n \n # Test job retrieval\n response = requests.get(f''http://localhost:8004/api/v1/jobs/{job_id}'', timeout=5)\n if response.status_code == 200:\n print(''Job retrieval successful!'')\n \n # Test job listing\n response = requests.get(''http://localhost:8004/api/v1/jobs/'', timeout=5)\n if response.status_code == 200:\n jobs_data = response.json()\n print(f''Job listing successful! Total jobs: {jobs_data[\"\"total\"\"]}'')\n \n print(''All API tests passed!'')\n else:\n print(f''Job submission failed: {response.text}'')\n \nfinally:\n # Clean up\n server_process.terminate()\n server_process.wait()\n\")", |
| 43 | + "Bash(VIDEOANNOTATOR_DB_PATH=\"test_refactored_startup.db\" timeout 10 uv run python api_server.py --port 8005 --log-level info)", |
| 44 | + "Bash(VIDEOANNOTATOR_DB_PATH=\"test_logging_fix.db\" timeout 8 uv run python api_server.py --port 8006 --log-level info)", |
| 45 | + "Bash(VIDEOANNOTATOR_DB_PATH=\"test_clean_logging.db\" timeout 8 uv run python api_server.py --port 8007 --log-level info)", |
| 46 | + "Bash(taskkill:*)", |
| 47 | + "Bash(powershell:*)", |
| 48 | + "Bash(VIDEOANNOTATOR_DB_PATH=\"test_single_server.db\" timeout 6 uv run python api_server.py --port 8888 --log-level info)", |
| 49 | + "Bash(VIDEOANNOTATOR_DB_PATH=\"test_fix_output_dir.db\" uv run python -c \"\nimport subprocess\nimport time\nimport requests\nimport os\n\nprint(''[TEST] Testing JobProcessor with output_dir fix...'')\n\n# Start server in background\nserver_process = subprocess.Popen(\n [''uv'', ''run'', ''python'', ''api_server.py'', ''--port'', ''8900'', ''--log-level'', ''info''],\n env=dict(os.environ, VIDEOANNOTATOR_DB_PATH=''test_fix_output_dir.db''),\n stdout=subprocess.PIPE,\n stderr=subprocess.PIPE\n)\n\ntry:\n # Wait for server to start\n time.sleep(5)\n \n # Test job submission with a small test video\n test_content = b''fake video content for testing''\n files = {''video'': (''test_video.mp4'', test_content, ''video/mp4'')}\n data = {''selected_pipelines'': ''scene,person''}\n \n print(''[TEST] Submitting job...'')\n response = requests.post(''http://localhost:8900/api/v1/jobs/'', files=files, data=data, timeout=10)\n \n print(f''Job submission status: {response.status_code}'')\n if response.status_code == 201:\n job_data = response.json()\n job_id = job_data[''id'']\n print(f''Job created successfully! ID: {job_id}'')\n \n # Wait a few seconds and check job status\n time.sleep(8)\n \n response = requests.get(f''http://localhost:8900/api/v1/jobs/{job_id}'', timeout=5)\n if response.status_code == 200:\n updated_job = response.json()\n print(f''Job status: {updated_job[\"\"status\"\"]}'')\n if updated_job.get(''error_message''):\n print(f''Error message: {updated_job[\"\"error_message\"\"]}'')\n else:\n print(''[SUCCESS] Job processed without output_dir error!'')\n \n else:\n print(f''Job submission failed: {response.text}'')\n \nfinally:\n # Clean up\n server_process.terminate()\n server_process.wait()\n print(''[CLEANUP] Server stopped'')\n\")", |
| 50 | + "Bash(dir /o-d logserrors.log)", |
| 51 | + "Bash(dir test_*)", |
| 52 | + "Bash(del /F test_fix_output_dir.db)" |
40 | 53 | ], |
41 | 54 | "deny": [] |
42 | 55 | } |
|
0 commit comments