From abd1e562f64ffc1d347df18e640c240dae6fbbdd Mon Sep 17 00:00:00 2001 From: "Matthew A. Knop" Date: Fri, 25 Mar 2022 10:49:17 -0600 Subject: [PATCH] [RHCLOUD-18586] Added minimum duration of 30 mins. (#200) Co-authored-by: Matthew Knop --- bonfire/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bonfire/utils.py b/bonfire/utils.py index eea4e62e..46bb916b 100644 --- a/bonfire/utils.py +++ b/bonfire/utils.py @@ -135,6 +135,8 @@ def validate_time_string(time): seconds = hms_to_seconds(time) if seconds > 1209600: # 14 days raise ValueError(f"invalid duration '{time}', must be less than 14 days") + elif seconds < 1800: # 30 mins + raise ValueError(f"invalid duration '{time}', must be more than 30 mins") return time