Prohibit pipeline failures

This commit is contained in:
Andrew Gaul 2019-07-02 22:31:48 -07:00
parent 511d223468
commit 9472ee4a01
4 changed files with 17 additions and 6 deletions

View File

@ -38,6 +38,8 @@
# eg: VALGRIND="--tool=memcheck --leak-check=full" ./small-integration-test.sh # eg: VALGRIND="--tool=memcheck --leak-check=full" ./small-integration-test.sh
set -o errexit set -o errexit
set -o pipefail
S3FS=../src/s3fs S3FS=../src/s3fs
# Allow these defaulted values to be overridden # Allow these defaulted values to be overridden

View File

@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
set -o errexit set -o errexit
set -o pipefail
source test-utils.sh source test-utils.sh
@ -290,7 +291,10 @@ function test_remove_nonempty_directory {
describe "Testing removing a non-empty directory" describe "Testing removing a non-empty directory"
mk_test_dir mk_test_dir
touch "${TEST_DIR}/file" touch "${TEST_DIR}/file"
(
set +o pipefail
rmdir "${TEST_DIR}" 2>&1 | grep -q "Directory not empty" rmdir "${TEST_DIR}" 2>&1 | grep -q "Directory not empty"
)
rm "${TEST_DIR}/file" rm "${TEST_DIR}/file"
rm_test_dir rm_test_dir
} }
@ -365,11 +369,14 @@ function test_multipart_copy {
function test_special_characters { function test_special_characters {
describe "Testing special characters ..." describe "Testing special characters ..."
(
set +o pipefail
ls 'special' 2>&1 | grep -q 'No such file or directory' ls 'special' 2>&1 | grep -q 'No such file or directory'
ls 'special?' 2>&1 | grep -q 'No such file or directory' ls 'special?' 2>&1 | grep -q 'No such file or directory'
ls 'special*' 2>&1 | grep -q 'No such file or directory' ls 'special*' 2>&1 | grep -q 'No such file or directory'
ls 'special~' 2>&1 | grep -q 'No such file or directory' ls 'special~' 2>&1 | grep -q 'No such file or directory'
ls 'specialµ' 2>&1 | grep -q 'No such file or directory' ls 'specialµ' 2>&1 | grep -q 'No such file or directory'
)
} }
function test_symlink { function test_symlink {

View File

@ -5,6 +5,7 @@
# #
set -o errexit set -o errexit
set -o pipefail
# Require root # Require root
REQUIRE_ROOT=require-root.sh REQUIRE_ROOT=require-root.sh

View File

@ -3,6 +3,7 @@
#### Test utils #### Test utils
set -o errexit set -o errexit
set -o pipefail
# Configuration # Configuration
TEST_TEXT="HELLO WORLD" TEST_TEXT="HELLO WORLD"