Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail if pipe fails during terratest #886

Merged
merged 1 commit into from
May 2, 2022
Merged

Conversation

jkremser
Copy link
Member

@jkremser jkremser commented May 2, 2022

Fix #883

by default, the non-0 exit code is swallowed

false | tee /dev/stdout
echo $?
0

so we need to:

set -o pipefail
false | tee /dev/stdout
echo $?
1

tested in https://github.com/jkremser/k8gb/runs/6257620790?check_suite_focus=true

Signed-off-by: Jirka Kremser jiri.kremser@gmail.com

Signed-off-by: Jirka Kremser <jiri.kremser@gmail.com>
@jkremser jkremser merged commit bf82fed into k8gb-io:master May 2, 2022
@jkremser jkremser deleted the issue-883 branch May 2, 2022 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed test in terratests doesn't fail the GH pipeline
4 participants