diff --git a/test/integration-test-common.sh b/test/integration-test-common.sh index d53fdf0..24aa246 100644 --- a/test/integration-test-common.sh +++ b/test/integration-test-common.sh @@ -108,7 +108,7 @@ function retry { for i in $(seq $N); do echo "Trying: $*" eval $@; rc=$? - if [ $rc == 0 ]; then + if [ $rc = 0 ]; then break fi sleep 1 diff --git a/test/integration-test-main.sh b/test/integration-test-main.sh index ceb1a87..d8eacd5 100755 --- a/test/integration-test-main.sh +++ b/test/integration-test-main.sh @@ -262,7 +262,7 @@ function test_chmod { # if they're the same, we have a problem. local CHANGED_PERMISSIONS=$(get_permissions $TEST_TEXT_FILE) - if [ $CHANGED_PERMISSIONS == $ORIGINAL_PERMISSIONS ] + if [ $CHANGED_PERMISSIONS = $ORIGINAL_PERMISSIONS ] then echo "Could not modify $TEST_TEXT_FILE permissions" return 1 @@ -299,9 +299,9 @@ function test_chown { else local CHANGED_PERMISSIONS=$(stat --format=%u:%g $TEST_TEXT_FILE) fi - if [ $CHANGED_PERMISSIONS == $ORIGINAL_PERMISSIONS ] + if [ $CHANGED_PERMISSIONS = $ORIGINAL_PERMISSIONS ] then - if [ $ORIGINAL_PERMISSIONS == "1000:1000" ] + if [ $ORIGINAL_PERMISSIONS = "1000:1000" ] then echo "Could not be strict check because original file permission 1000:1000" else diff --git a/test/test-utils.sh b/test/test-utils.sh index 961ff90..8b11a97 100644 --- a/test/test-utils.sh +++ b/test/test-utils.sh @@ -115,7 +115,7 @@ function check_file_size() { } function mk_test_file { - if [ $# == 0 ]; then + if [ $# = 0 ]; then local TEXT=$TEST_TEXT else local TEXT=$1 @@ -144,7 +144,7 @@ function mk_test_file { } function rm_test_file { - if [ $# == 0 ]; then + if [ $# = 0 ]; then local FILE=$TEST_TEXT_FILE else local FILE=$1 @@ -178,7 +178,7 @@ function rm_test_dir { # Create and cd to a unique directory for this test run # Sets RUN_DIR to the name of the created directory function cd_run_dir { - if [ "$TEST_BUCKET_MOUNT_POINT_1" == "" ]; then + if [ "$TEST_BUCKET_MOUNT_POINT_1" = "" ]; then echo "TEST_BUCKET_MOUNT_POINT_1 variable not set" exit 1 fi @@ -240,7 +240,7 @@ function run_suite { TEST_DIR=testdir-$RANDOM $t $key_prefix && rc=$? || rc=$? - if [[ $rc == 0 ]] ; then + if [[ $rc = 0 ]] ; then report_pass $t else report_fail $t