Skip to content

Commit 4188acb

Browse files
committed
fix test assert for openshift
1 parent 0b81579 commit 4188acb

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/templates/kuttl/opa-authorization/50-assert.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@ apiVersion: kuttl.dev/v1beta1
33
kind: TestAssert
44
timeout: 300
55
commands:
6-
# Check that a graceful shutdown was triggered (it needs OPA permissions)
7-
- script: 'kubectl -n $NAMESPACE logs trino-worker-default-0 | grep -P "io.trino.server.NodeStateManager[\h]*Shutdown requested"'
6+
# Check that a graceful shutdown was triggered (it needs OPA permissions).
7+
# Strip ANSI colour codes first: on OpenShift the container runtime sets TERM=xterm, so Trino
8+
# colourises its logs and the escape sequences would otherwise break the grep pattern below.
9+
- script: 'kubectl -n $NAMESPACE logs trino-worker-default-0 | sed "s/\x1b\[[0-9;]*m//g" | grep -P "io.trino.server.NodeStateManager[\h]*Shutdown requested"'

0 commit comments

Comments
 (0)