diff --git a/student-tests/test_lab7.py b/student-tests/test_lab7.py index 69c444f..9a2c7b8 100644 --- a/student-tests/test_lab7.py +++ b/student-tests/test_lab7.py @@ -177,7 +177,9 @@ def main(): wrong_name.startswith("cert_error"), wrong_name) # 1b. Наружу — только loopback-порты; app-контейнеры hardened. - ps_out = compose("ps", "--format", "{{.Service}}|{{.Ports}}").stdout + ps_out = run(["docker", "ps", + "--filter", "label=com.docker.compose.project=messenger-lab7", + "--format", "{{.Names}}|{{.Ports}}"]).stdout public = [line for line in ps_out.splitlines() if "->" in line and "127.0.0.1:" not in line and "[::1]:" not in line] check("exposure: no service published on all interfaces", not public,