mirror of
https://github.com/home-assistant/core.git
synced 2025-11-12 12:30:31 +00:00
Add flag to backup store to track backup wizard completion (#138368)
* Add flag to backup store to track backup wizard completion * Add comment * Update hassio tests * Update tests --------- Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
@@ -55,6 +55,7 @@ DEFAULT_STORAGE_DATA: dict[str, Any] = {
|
||||
"backups": [],
|
||||
"config": {
|
||||
"agents": {},
|
||||
"automatic_backups_configured": False,
|
||||
"create_backup": {
|
||||
"agent_ids": [],
|
||||
"include_addons": None,
|
||||
@@ -907,6 +908,7 @@ async def test_agents_info(
|
||||
"backups": [],
|
||||
"config": {
|
||||
"agents": {},
|
||||
"automatic_backups_configured": False,
|
||||
"create_backup": {
|
||||
"agent_ids": ["test-agent"],
|
||||
"include_addons": ["test-addon"],
|
||||
@@ -938,6 +940,7 @@ async def test_agents_info(
|
||||
"backups": [],
|
||||
"config": {
|
||||
"agents": {},
|
||||
"automatic_backups_configured": True,
|
||||
"create_backup": {
|
||||
"agent_ids": ["test-agent"],
|
||||
"include_addons": None,
|
||||
@@ -969,6 +972,7 @@ async def test_agents_info(
|
||||
"backups": [],
|
||||
"config": {
|
||||
"agents": {},
|
||||
"automatic_backups_configured": False,
|
||||
"create_backup": {
|
||||
"agent_ids": ["test-agent"],
|
||||
"include_addons": None,
|
||||
@@ -1000,6 +1004,7 @@ async def test_agents_info(
|
||||
"backups": [],
|
||||
"config": {
|
||||
"agents": {},
|
||||
"automatic_backups_configured": False,
|
||||
"create_backup": {
|
||||
"agent_ids": ["test-agent"],
|
||||
"include_addons": None,
|
||||
@@ -1031,6 +1036,7 @@ async def test_agents_info(
|
||||
"backups": [],
|
||||
"config": {
|
||||
"agents": {},
|
||||
"automatic_backups_configured": False,
|
||||
"create_backup": {
|
||||
"agent_ids": ["test-agent"],
|
||||
"include_addons": None,
|
||||
@@ -1062,6 +1068,7 @@ async def test_agents_info(
|
||||
"backups": [],
|
||||
"config": {
|
||||
"agents": {},
|
||||
"automatic_backups_configured": False,
|
||||
"create_backup": {
|
||||
"agent_ids": ["test-agent"],
|
||||
"include_addons": None,
|
||||
@@ -1096,6 +1103,7 @@ async def test_agents_info(
|
||||
"test-agent1": {"protected": True},
|
||||
"test-agent2": {"protected": False},
|
||||
},
|
||||
"automatic_backups_configured": False,
|
||||
"create_backup": {
|
||||
"agent_ids": ["test-agent"],
|
||||
"include_addons": None,
|
||||
@@ -1127,6 +1135,7 @@ async def test_agents_info(
|
||||
"backups": [],
|
||||
"config": {
|
||||
"agents": {},
|
||||
"automatic_backups_configured": True,
|
||||
"create_backup": {
|
||||
"agent_ids": ["hassio.local", "hassio.share", "test-agent"],
|
||||
"include_addons": None,
|
||||
@@ -1158,6 +1167,7 @@ async def test_agents_info(
|
||||
"backups": [],
|
||||
"config": {
|
||||
"agents": {},
|
||||
"automatic_backups_configured": True,
|
||||
"create_backup": {
|
||||
"agent_ids": ["backup.local", "test-agent"],
|
||||
"include_addons": None,
|
||||
@@ -1343,6 +1353,18 @@ async def test_config_load_config_info(
|
||||
},
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
"type": "backup/config/update",
|
||||
"automatic_backups_configured": False,
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"type": "backup/config/update",
|
||||
"automatic_backups_configured": True,
|
||||
}
|
||||
],
|
||||
],
|
||||
)
|
||||
@patch("homeassistant.components.backup.config.random.randint", Mock(return_value=600))
|
||||
@@ -1774,6 +1796,7 @@ async def test_config_schedule_logic(
|
||||
"backups": [],
|
||||
"config": {
|
||||
"agents": {},
|
||||
"automatic_backups_configured": False,
|
||||
"create_backup": {
|
||||
"agent_ids": ["test.test-agent"],
|
||||
"include_addons": [],
|
||||
@@ -2436,6 +2459,7 @@ async def test_config_retention_copies_logic(
|
||||
"backups": [],
|
||||
"config": {
|
||||
"agents": {},
|
||||
"automatic_backups_configured": False,
|
||||
"create_backup": {
|
||||
"agent_ids": ["test-agent"],
|
||||
"include_addons": ["test-addon"],
|
||||
@@ -2714,6 +2738,7 @@ async def test_config_retention_copies_logic_manual_backup(
|
||||
"backups": [],
|
||||
"config": {
|
||||
"agents": {},
|
||||
"automatic_backups_configured": False,
|
||||
"create_backup": {
|
||||
"agent_ids": ["test-agent"],
|
||||
"include_addons": ["test-addon"],
|
||||
@@ -3161,6 +3186,7 @@ async def test_config_retention_days_logic(
|
||||
"backups": [],
|
||||
"config": {
|
||||
"agents": {},
|
||||
"automatic_backups_configured": False,
|
||||
"create_backup": {
|
||||
"agent_ids": ["test-agent"],
|
||||
"include_addons": ["test-addon"],
|
||||
|
||||
Reference in New Issue
Block a user