mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-04-23 12:47:16 +00:00

* Supervisor container startup health function * better struct * add test * address comment * rename file * Update tests/test_main.py Co-authored-by: Stefan Agner <stefan@agner.ch> Co-authored-by: Stefan Agner <stefan@agner.ch>
18 lines
394 B
Python
18 lines
394 B
Python
"""Testing handling with main."""
|
|
from pathlib import Path
|
|
|
|
import supervisor.__main__ as main
|
|
|
|
|
|
def test_write_state(tmp_path):
|
|
"""Test startup-marker file cleanup."""
|
|
test_file = Path(tmp_path, "test.file")
|
|
|
|
test_file.touch()
|
|
assert test_file.exists()
|
|
|
|
main.CONTAINER_OS_STARTUP_CHECK = test_file
|
|
main.run_os_startup_check_cleanup()
|
|
|
|
assert not test_file.exists()
|