Skip to content

Commit 81137ad

Browse files
committed
Order enum and add tests
1 parent c6ed6ee commit 81137ad

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

supervisor/resolution/const.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ class UnsupportedReason(StrEnum):
4949
NETWORK_MANAGER = "network_manager"
5050
OS = "os"
5151
OS_AGENT = "os_agent"
52+
OS_VERSION = "os_version"
5253
PRIVILEGED = "privileged"
5354
RESTART_POLICY = "restart_policy"
5455
SOFTWARE = "software"
@@ -58,7 +59,6 @@ class UnsupportedReason(StrEnum):
5859
SYSTEMD_JOURNAL = "systemd_journal"
5960
SYSTEMD_RESOLVED = "systemd_resolved"
6061
VIRTUALIZATION_IMAGE = "virtualization_image"
61-
OS_VERSION = "os_version"
6262

6363

6464
class UnhealthyReason(StrEnum):

tests/resolution/evaluation/test_evaluate_os_version.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
("10.5", "10.5", False), # up to date, supported
2222
("10.5", "10.6", False), # same major, supported
2323
("10.0", "13.3", False), # 3 major behind, supported
24+
("10.2.dev20240321", "15.0", True), # 5 major behind, dev version, unsupported
25+
("10.2.dev20240321", "13.0", False), # 3 major behind, dev version, supported
26+
("10.2.rc2", "15.0", True), # 5 major behind, rc version, unsupported
27+
("10.2.rc2", "13.0", False), # 3 major behind, rc version, supported
2428
(None, "15.0", False), # No current version info, check skipped
2529
("2.0", None, False), # No latest version info, check skipped
2630
(

0 commit comments

Comments
 (0)