fix web container healthcheck
CI / compose (push) Failing after 9m19s

This commit is contained in:
Marco0300
2026-09-03 13:47:45 +02:00
parent af9862a794
commit 54af01091d
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -46,6 +46,12 @@ class Phase15OpsTests(unittest.TestCase):
finally:
server.shutdown(); server.server_close(); thread.join(timeout=2)
def test_web_healthcheck_uses_image_runtime(self):
compose = (ROOT / "docker-compose.yml").read_text()
self.assertIn("python", compose)
self.assertIn("urllib.request.urlopen('http://127.0.0.1:8080/healthz'", compose)
self.assertNotIn('test: ["CMD", "wget", "--spider"', compose)
def test_backup_restore_integrity_and_checksum(self):
with TemporaryDirectory() as tmp:
root = Path(tmp); db = root / "prospects.db"; backups = root / "backups"
+1 -1
View File
@@ -56,7 +56,7 @@ services:
cap_drop:
- ALL
healthcheck:
test: ["CMD", "wget", "--spider", "--quiet", "http://127.0.0.1:8080/healthz"]
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8080/healthz', timeout=2)"]
interval: 10s
timeout: 3s
retries: 5