Remove terminal colouring from test output so it is (#14810)

more readable in CI.

```
Running primary verification step for case-ingress-gateway-multiple-services...
�[34;1mverify.bats
�[0m�[1G   ingress proxy admin is up on :20000�[K�[75G 1/12�[2G�[1G ✓ ingress proxy admin is up on :20000�[K
�[0m�[1G   s1 proxy admin is up on :19000�[K�[75G 2/12�[2G�[1G ✓ s1 proxy admin is up on :19000�[K
�[0m�[1G   s2 proxy admin is up on :19001�[K�[75G 3/12�[2G�[1G ✓ s2 proxy admin is up on :19001�[K
�[0m�[1G   s1 proxy listener should be up and have right cert�[K�[75G 4/12�[2G�[1G ✓ s1 proxy listener should be up and have right cert�[K
�[0m�[1G   s2 proxy listener should be up and have right cert�[K�[75G 5/12�[2G�[1G ✓ s2 proxy listener should be up and have right cert�[K
�[0m�[1G   ingress-gateway should have healthy endpoints for s1�[K�[75G 6/12�[2G�[31;1m�[1G ✗ ingress-gateway should have healthy endpoints for s1�[K
�[0m�[31;22m   (from function `assert_upstream_has_endpoints_in_status' in file /workdir/primary/bats/helpers.bash, line 385,
```

versus

```
Running primary verification step for case-ingress-gateway-multiple-services...
1..12
ok 1 ingress proxy admin is up on :20000
ok 2 s1 proxy admin is up on :19000
ok 3 s2 proxy admin is up on :19001
ok 4 s1 proxy listener should be up and have right cert
ok 5 s2 proxy listener should be up and have right cert
not ok 6 ingress-gateway should have healthy endpoints for s1
not ok 7 s1 proxy should have been configured with max_connections in services
ok 8 ingress-gateway should have healthy endpoints for s2
```
This commit is contained in:
Luke Kysow 2022-10-04 08:35:19 -07:00 committed by GitHub
parent f5cb922dd0
commit 960c42854b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 32 deletions

View File

@ -51,34 +51,6 @@ function retry_long {
retry 30 1 "$@" retry 30 1 "$@"
} }
function echored {
tput setaf 1
tput bold
echo $@
tput sgr0
}
function echogreen {
tput setaf 2
tput bold
echo $@
tput sgr0
}
function echoyellow {
tput setaf 3
tput bold
echo $@
tput sgr0
}
function echoblue {
tput setaf 4
tput bold
echo $@
tput sgr0
}
function is_set { function is_set {
# Arguments: # Arguments:
# $1 - string value to check its truthiness # $1 - string value to check its truthiness

View File

@ -354,10 +354,10 @@ function verify {
$(network_snippet $CLUSTER) \ $(network_snippet $CLUSTER) \
$(aws_snippet) \ $(aws_snippet) \
bats-verify \ bats-verify \
--pretty /workdir/${CLUSTER}/bats ; then --formatter tap /workdir/${CLUSTER}/bats ; then
echogreen "✓ PASS" echo "✓ PASS"
else else
echored " FAIL" echo " FAIL"
res=1 res=1
fi fi
@ -472,7 +472,7 @@ function run_tests {
# Allow vars.sh to set a reason to skip this test case based on the ENV # Allow vars.sh to set a reason to skip this test case based on the ENV
if [ "$SKIP_CASE" != "" ] ; then if [ "$SKIP_CASE" != "" ] ; then
echoyellow "SKIPPING CASE: $SKIP_CASE" echo "SKIPPING CASE: $SKIP_CASE"
return 0 return 0
fi fi