1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2025-12-24 12:29:08 +00:00

FileConfiguration uses executor for I/O (#5652)

* FileConfiguration uses executor for I/O

* Fix credentials tests

* Remove migrate_system_env as its very deprecated
This commit is contained in:
Mike Degatano
2025-02-26 13:11:11 -05:00
committed by GitHub
parent ae266e1692
commit 31193abb7b
48 changed files with 296 additions and 278 deletions

View File

@@ -8,7 +8,7 @@ from supervisor.docker.interface import DOCKER_HUB, DockerInterface
def test_no_credentials(coresys: CoreSys):
"""Test no credentials."""
docker = DockerInterface(coresys)
coresys.docker.config.registries = {
coresys.docker.config._data["registries"] = {
DOCKER_HUB: {"username": "Spongebob Squarepants", "password": "Password1!"}
}
assert not docker._get_credentials("ghcr.io/homeassistant")
@@ -18,7 +18,7 @@ def test_no_credentials(coresys: CoreSys):
def test_no_matching_credentials(coresys: CoreSys):
"""Test no matching credentials."""
docker = DockerInterface(coresys)
coresys.docker.config.registries = {
coresys.docker.config._data["registries"] = {
DOCKER_HUB: {"username": "Spongebob Squarepants", "password": "Password1!"}
}
assert not docker._get_credentials("ghcr.io/homeassistant")
@@ -28,7 +28,7 @@ def test_no_matching_credentials(coresys: CoreSys):
def test_matching_credentials(coresys: CoreSys):
"""Test no matching credentials."""
docker = DockerInterface(coresys)
coresys.docker.config.registries = {
coresys.docker.config._data["registries"] = {
"ghcr.io": {"username": "Octocat", "password": "Password1!"},
DOCKER_HUB: {"username": "Spongebob Squarepants", "password": "Password1!"},
}