Introduce embedded HTTP server for HAProxy monitoring dashboard
- Added a Python-based HTTP server to serve `dashboard.html` at `/` or `/dashboard.html` paths. - Updated HAProxy configuration to integrate backend for the dashboard. - Enhanced handling of index paths with conditional redirects to the dashboard page. - Modified tests and updated expected outputs to reflect these changes.
This commit is contained in:
parent
67cfcf3aff
commit
7e3134155a
16 changed files with 153 additions and 70 deletions
|
|
@ -6,13 +6,12 @@ This module provides session-wide and function-level fixtures for testing.
|
|||
|
||||
import os
|
||||
import shutil
|
||||
import tempfile
|
||||
import pytest
|
||||
|
||||
|
||||
# Create a session-wide temporary directory for all tests
|
||||
# Use a different prefix to avoid conflicts with cleanup plugin (which looks for "easyhaproxy_*")
|
||||
_test_session_dir = tempfile.mkdtemp(prefix="pytest_easyhaproxy_")
|
||||
# Fixed temporary directory for all tests — predictable so expected fixtures can reference it
|
||||
_test_session_dir = "/tmp/easyhaproxy_test"
|
||||
os.makedirs(_test_session_dir, exist_ok=True)
|
||||
os.environ["EASYHAPROXY_BASE_PATH"] = _test_session_dir
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue