Skip to content

Commit a68d9ca

Browse files
test(smoke): Fix assertion
1 parent 2ac18df commit a68d9ca

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

tests/templates/kuttl/smoke/34-assert.yaml.j2

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,11 +339,17 @@ commands:
339339
}
340340
. |= parse_regex!(.file, r'^${LOG_DIR}/(?P<container>.*?)/(?P<file>.*?)$')
341341

342+
# Filters the logs of the Vector agent according to the defined log level
342343
filtered_logs_vector:
343344
inputs:
344345
- vector
345346
type: filter
346-
condition: '!includes(["TRACE", "DEBUG"], .metadata.level)'
347+
condition: >
348+
(.metadata.level == "TRACE" && "${VECTOR_FILE_LOG_LEVEL}" == "trace") ||
349+
(.metadata.level == "DEBUG" && includes(["trace", "debug"], "${VECTOR_FILE_LOG_LEVEL}")) ||
350+
(.metadata.level == "INFO" && includes(["trace", "debug", "info"], "${VECTOR_FILE_LOG_LEVEL}")) ||
351+
(.metadata.level == "WARN" && includes(["trace", "debug", "info", "warn"], "${VECTOR_FILE_LOG_LEVEL}")) ||
352+
(.metadata.level == "ERROR" && includes(["trace", "debug", "info", "warn", "error"], "${VECTOR_FILE_LOG_LEVEL}"))
347353

348354
extended_logs_vector:
349355
inputs:

0 commit comments

Comments
 (0)