存活探针契约。
| 207 | |
| 208 | |
| 209 | class TestLivenessProbe: |
| 210 | """存活探针契约。""" |
| 211 | |
| 212 | def test_status_200(self, client): |
| 213 | assert client.get("/api/livez").status_code == 200 |
| 214 | |
| 215 | def test_status_field_is_alive(self, client): |
| 216 | assert _json(client.get("/api/livez")).get("status") == "alive" |
| 217 | |
| 218 | |
| 219 | # --------------------------------------------------------------------------- |
nothing calls this directly
no outgoing calls
no test coverage detected