Skip to content

Commit

Permalink
test: detect errors in command pipelines (#3513)
Browse files Browse the repository at this point in the history
In e2e test suite, `set -o pipefail` in order to detect errors anywhere in a command pipeline.
  • Loading branch information
ericswanson-dfinity authored Jan 18, 2024
1 parent 0863345 commit 5826b8b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion e2e/tests-dfx/schema.bash
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ teardown() {
}

@test "dfx schema still works with broken dfx.json" {
jq '.broken_key="blahblahblah"' dfx.json | sponge dfx.json
echo '{}' | jq '.broken_key="blahblahblah"' > dfx.json
assert_command dfx schema
}
2 changes: 1 addition & 1 deletion e2e/utils/_.bash
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set -e
set -eo pipefail
load ../utils/bats-support/load
load ../utils/assertions
load ../utils/webserver
Expand Down

0 comments on commit 5826b8b

Please sign in to comment.