test(docker,traefik): count header cells, not <thead; read cert days against the cert's own clock (#5253, #5254)

CI 8548: '<th' also matched '<thead', and the certificate test's clock was
read before its certificates were built, so 10 days came out as 10.00…

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-07 13:27:26 -04:00
co-authored by Claude Opus 5.5
parent ea5531ac8f
commit a720403b47
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -235,6 +235,6 @@ async def test_busiest_containers_show_the_number_with_its_scale(app):
assert "Busiest: <strong>CI: Android · build</strong> on VDNT-Docker03" in page and "1.6 of 8 cores" in page
assert ">1.6 cores<" in page and ">0.25 cores<" in page and ">820.0 MiB<" in page
assert "--pct:20.25%" in page and ">—<" in page
assert page.count("<th") == 4
assert len(re.findall(r"<th[ >]", page)) == 4
assert ">CI: Android · build<" in page # the long CI name only as the hover title
assert not hex_colours(page), hex_colours(page)
+1 -1
View File
@@ -176,7 +176,7 @@ def test_each_router_gets_the_soonest_certificate_for_its_hosts():
got = certs_by_router(["app@docker", "docs@docker", "plain@docker"],
{"app@docker": ["app.example.com"], "docs@docker": ["docs.example.com"]},
certs, now)
assert got["app@docker"]["cn"] == "app.example.com" and int(got["app@docker"]["days"]) == 9
assert got["app@docker"]["cn"] == "app.example.com" and round(got["app@docker"]["days"]) == 10
assert got["docs@docker"]["cn"] == "*.example.com"
assert "plain@docker" not in got