mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-12-20 10:28:45 +00:00
Fix private registry authentication for aiodocker image pulls (#6355)
* Fix private registry authentication for aiodocker image pulls After PR #6252 migrated image pulling from dockerpy to aiodocker, private registry authentication stopped working. The old _docker_login() method stored credentials in ~/.docker/config.json via dockerpy, but aiodocker doesn't read that file - it requires credentials passed explicitly via the auth parameter. Changes: - Remove unused _docker_login() method (dockerpy login was ineffective) - Pass credentials directly to pull_image() via new auth parameter - Add auth parameter to DockerAPI.pull_image() method - Add unit tests for Docker Hub and custom registry authentication Fixes #6345 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Ignore protected access in test * Fix plug-in pull test * Fix HA core tests --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -369,7 +369,7 @@ async def test_load_with_incorrect_image(
|
||||
with patch.object(DockerAPI, "pull_image", return_value=img_data) as pull_image:
|
||||
await plugin.load()
|
||||
pull_image.assert_called_once_with(
|
||||
ANY, correct_image, "2024.4.0", platform="linux/amd64"
|
||||
ANY, correct_image, "2024.4.0", platform="linux/amd64", auth=None
|
||||
)
|
||||
|
||||
container.remove.assert_called_once_with(force=True, v=True)
|
||||
|
||||
Reference in New Issue
Block a user