mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-12-20 18:38:59 +00:00
Exclude already-existing layers from pull progress calculation
Layers that already exist locally should not count towards download progress since there's nothing to download for them. Only layers that need pulling are included in the progress calculation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -591,11 +591,9 @@ class TestImagePullProgress:
|
||||
)
|
||||
)
|
||||
|
||||
# Count-based: 2 layers total, each = 50%
|
||||
# cached: 100% (already exists)
|
||||
# Only 1 layer needs pulling (cached layer excluded)
|
||||
# pulled: 35% (50% of 70% download weight)
|
||||
# Total: (100 + 35) / 2 = 67.5%
|
||||
assert progress.calculate_progress() == pytest.approx(67.5)
|
||||
assert progress.calculate_progress() == pytest.approx(35.0)
|
||||
|
||||
# Complete the pulled layer
|
||||
progress.process_event(
|
||||
|
||||
Reference in New Issue
Block a user