fix(docker): keep the space before a heading's restarting/unhealthy count (#5214)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -75,7 +75,7 @@ async def test_a_crash_loop_comes_first_and_a_stale_row_says_so(app):
|
||||
# #5298: the verdict first; each problem section carries its own count (#5214).
|
||||
assert page.index('class="docker-verdict"') < page.index("Needs attention")
|
||||
assert "1 needs attention" in page and "1 container running, 1 stopped" in page
|
||||
assert "unhealthy</span>" not in page and "Failed in the last 24h" not in page and "stat-strip" not in page
|
||||
assert " unhealthy</span>" not in page and "Failed in the last 24h" not in page and "stat-strip" not in page
|
||||
card = page[page.index("Needs attention"):page.index("</section>")]
|
||||
assert '<span class="badge badge-crit">Restarting</span>' in card
|
||||
assert 'href="/plugins/docker/container/h1/api" title="api">api</a>' in card
|
||||
@@ -84,8 +84,8 @@ async def test_a_crash_loop_comes_first_and_a_stale_row_says_so(app):
|
||||
assert "cache" not in card
|
||||
assert page.index("Needs attention") < page.index("<table")
|
||||
|
||||
assert ('Needs attention <span class="tone-crit">1</span> '
|
||||
'<span class="tone-muted">· 1 restarting</span></h2>') in card
|
||||
assert ('Needs attention <span class="tone-crit">1</span>'
|
||||
'<span class="tone-muted"> · 1 restarting</span></h2>') in card
|
||||
assert '">1 stale</span>' in page[:page.index("</p>")] # stale sits in the verdict
|
||||
assert 'class="badge badge-warn" title="Last report' in page # the stale row
|
||||
# CPU in cores, toned by its share of the host's CPUs through Settings → Thresholds.
|
||||
|
||||
Reference in New Issue
Block a user