diff --git a/src/schemas/deployment.py b/src/schemas/deployment.py index 6465aa1..c1bb969 100644 --- a/src/schemas/deployment.py +++ b/src/schemas/deployment.py @@ -6,7 +6,7 @@ # Allowed lifetime presets matching the Wizard dropdown. # Keep this in sync with appstore-frontend/src/pages/DeploymentWizard.tsx. -ALLOWED_RUNTIME_MONTHS = (1, 3, 4, 6, 12, 24) +ALLOWED_RUNTIME_MONTHS = (1, 3, 4, 6, 12, 24, 36) DEFAULT_RUNTIME_MONTHS = 4 diff --git a/src/utils/deployment_expiry.py b/src/utils/deployment_expiry.py index 01b8fe6..aa96054 100644 --- a/src/utils/deployment_expiry.py +++ b/src/utils/deployment_expiry.py @@ -19,7 +19,7 @@ WARNING_FRACTION_OF_RUNTIME = 0.25 # Average month length used to derive timedelta from ``runtime_months``. Calendar -# months vary; over 1..24 months this ~30.44-day approximation drifts at most a +# months vary; over 1..36 months this ~30.44-day approximation drifts at most a # day or two from the calendar date — acceptable for an expiry deadline. DAYS_PER_MONTH = 30 diff --git a/tests/unit/test_deployment_expiry_helpers.py b/tests/unit/test_deployment_expiry_helpers.py index fda78e0..52daa69 100644 --- a/tests/unit/test_deployment_expiry_helpers.py +++ b/tests/unit/test_deployment_expiry_helpers.py @@ -20,7 +20,7 @@ def _now() -> datetime: return datetime(2026, 6, 20, 12, 0, 0, tzinfo=timezone.utc) -@pytest.mark.parametrize("months", [1, 3, 4, 6, 12, 24]) +@pytest.mark.parametrize("months", [1, 3, 4, 6, 12, 24, 36]) def test_compute_expiry_returns_two_future_timestamps(months: int): """expires_at and expiry_warning_at must both be in the future.""" now = _now() diff --git a/tests/unit/test_deployment_runtime_validation.py b/tests/unit/test_deployment_runtime_validation.py index 9c66443..c2e5ec6 100644 --- a/tests/unit/test_deployment_runtime_validation.py +++ b/tests/unit/test_deployment_runtime_validation.py @@ -16,17 +16,17 @@ def test_default_runtime_months_is_4(): def test_allowed_set_matches_wizard_dropdown(): """Backend's allowed set must match the Wizard