Revert "Revert Home Assistant configuration to /config" (#4702)

This commit is contained in:
Franck Nijhof 2023-11-13 20:11:04 +01:00 committed by GitHub
parent 3116f183f5
commit bef0f023d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -360,18 +360,18 @@ class DockerAddon(DockerInterface):
Mount( Mount(
type=MountType.BIND, type=MountType.BIND,
source=self.addon.path_extern_config.as_posix(), source=self.addon.path_extern_config.as_posix(),
target="/addon_config", target="/config",
read_only=addon_mapping[MAP_ADDON_CONFIG], read_only=addon_mapping[MAP_ADDON_CONFIG],
) )
) )
# Map Home Assistant config using the new mapping to /config still # Map Home Assistant config in new way
if MAP_HOMEASSISTANT_CONFIG in addon_mapping: if MAP_HOMEASSISTANT_CONFIG in addon_mapping:
mounts.append( mounts.append(
Mount( Mount(
type=MountType.BIND, type=MountType.BIND,
source=self.sys_config.path_extern_homeassistant.as_posix(), source=self.sys_config.path_extern_homeassistant.as_posix(),
target="/config", target="/homeassistant",
read_only=addon_mapping[MAP_HOMEASSISTANT_CONFIG], read_only=addon_mapping[MAP_HOMEASSISTANT_CONFIG],
) )
) )

View File

@ -149,12 +149,12 @@ def test_addon_map_homeassistant_folder(
config["map"].append("homeassistant_config") config["map"].append("homeassistant_config")
docker_addon = get_docker_addon(coresys, addonsdata_system, config) docker_addon = get_docker_addon(coresys, addonsdata_system, config)
# Home Assistant config folder still mounted to /config # Home Assistant config folder mounted to /homeassistant, not /config
assert ( assert (
Mount( Mount(
type="bind", type="bind",
source=coresys.config.path_extern_homeassistant.as_posix(), source=coresys.config.path_extern_homeassistant.as_posix(),
target="/config", target="/homeassistant",
read_only=True, read_only=True,
) )
in docker_addon.mounts in docker_addon.mounts
@ -194,7 +194,7 @@ def test_addon_map_addon_config_folder(
Mount( Mount(
type="bind", type="bind",
source=docker_addon.addon.path_extern_config.as_posix(), source=docker_addon.addon.path_extern_config.as_posix(),
target="/addon_config", target="/config",
read_only=True, read_only=True,
) )
in docker_addon.mounts in docker_addon.mounts