Skip to content

Commit

Permalink
Add 'true'/'false' operators that ignore threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
SoerenHenning committed Nov 14, 2023
1 parent 2a164fc commit 9bf2e09
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions slo-checker/generic/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ def check_result(result, operator: str, threshold):
return result > threshold
if operator == 'gte':
return result >= threshold
if operator == 'true':
return True # Mainly used for testing
if operator == 'false':
return False # Mainly used for testing
else:
raise ValueError('Invalid operator string.')

Expand Down

0 comments on commit 9bf2e09

Please sign in to comment.