test: Add several tests for numerical conditions

This commit is contained in:
TwiN
2023-01-19 01:37:21 -05:00
parent 0ffa03f42d
commit 0db92f46da
2 changed files with 36 additions and 0 deletions

View File

@ -11,6 +11,7 @@ import (
"github.com/TwiN/gatus/v5/pattern"
)
// Placeholders
const (
// StatusPlaceholder is a placeholder for a HTTP status.
//
@ -49,7 +50,10 @@ const (
// DomainExpirationPlaceholder is a placeholder for the duration before the domain expires, in milliseconds.
DomainExpirationPlaceholder = "[DOMAIN_EXPIRATION]"
)
// Functions
const (
// LengthFunctionPrefix is the prefix for the length function
//
// Usage: len([BODY].articles) == 10, len([BODY].name) > 5
@ -72,7 +76,10 @@ const (
// FunctionSuffix is the suffix for all functions
FunctionSuffix = ")"
)
// Other constants
const (
// InvalidConditionElementSuffix is the suffix that will be appended to an invalid condition
InvalidConditionElementSuffix = "(INVALID)"