@@ -46,6 +46,12 @@ class Phase15OpsTests(unittest.TestCase):
|
|||||||
finally:
|
finally:
|
||||||
server.shutdown(); server.server_close(); thread.join(timeout=2)
|
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):
|
def test_backup_restore_integrity_and_checksum(self):
|
||||||
with TemporaryDirectory() as tmp:
|
with TemporaryDirectory() as tmp:
|
||||||
root = Path(tmp); db = root / "prospects.db"; backups = root / "backups"
|
root = Path(tmp); db = root / "prospects.db"; backups = root / "backups"
|
||||||
|
|||||||
+1
-1
@@ -56,7 +56,7 @@ services:
|
|||||||
cap_drop:
|
cap_drop:
|
||||||
- ALL
|
- ALL
|
||||||
healthcheck:
|
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
|
interval: 10s
|
||||||
timeout: 3s
|
timeout: 3s
|
||||||
retries: 5
|
retries: 5
|
||||||
|
|||||||
Reference in New Issue
Block a user