test: DSL test fixes (hmac_sha256, time_format)

dev
forgedhallpass 2022-05-24 13:11:03 +03:00
parent feae805834
commit 45c27bc5f0
1 changed files with 3 additions and 1 deletions

View File

@ -117,6 +117,7 @@ func TestGetPrintableDslFunctionSignatures(t *testing.T) {
gzip_decode(arg1 interface{}) interface{}
hex_decode(arg1 interface{}) interface{}
hex_encode(arg1 interface{}) interface{}
hmac_sha256(arg1, arg2 interface{}) interface{}
html_escape(arg1 interface{}) interface{}
html_unescape(arg1 interface{}) interface{}
len(arg1 interface{}) interface{}
@ -139,6 +140,7 @@ func TestGetPrintableDslFunctionSignatures(t *testing.T) {
sha1(arg1 interface{}) interface{}
sha256(arg1 interface{}) interface{}
time(arg1 interface{}) interface{}
time_format(arg1 interface{}) interface{}
timetostring(arg1 interface{}) interface{}
to_lower(arg1 interface{}) interface{}
to_number(arg1 interface{}) interface{}
@ -225,7 +227,7 @@ func TestDslExpressions(t *testing.T) {
`compare_versions('v1.0.0', '>v0.0.1,<v1.0.1')`: true,
`compare_versions('v1.0.0', '>v0.0.1', '<v1.0.1')`: true,
`hmac_sha256('test','scrt')`: "1f1bff5574f18426eb376d6dd5368a754e67a798aa2074644d5e3fd4c90c7a92",
`time_format("02-01-2006 15:04:05")`: now.Format("02-01-2006 15:04:05"),
`time_format("02-01-2006 15:04")`: now.Format("02-01-2006 15:04"),
}
for dslExpression, expectedResult := range dslExpressions {