diff --git a/scripts/cassandra-integration-test.sh b/scripts/cassandra-integration-test.sh index 25e951bf1df..97597adcaf8 100755 --- a/scripts/cassandra-integration-test.sh +++ b/scripts/cassandra-integration-test.sh @@ -14,22 +14,25 @@ end_time=$((SECONDS + timeout)) SKIP_APPLY_SCHEMA="false" while getopts "s" opt; do - case "${opt}" in - s) + case "${opt}" in + s) SKIP_APPLY_SCHEMA="true" - ;; + ;; *) - ;; - esac + ;; + esac done +# remove flags, leave only positional args +shift $((OPTIND - 1)) + usage() { echo $"Usage: $0 " exit 1 } check_arg() { - if [ ! $# -ge 3 ]; then + if [ ! $# -eq 3 ]; then echo "ERROR: need exactly three arguments, " usage fi @@ -110,7 +113,7 @@ run_integration_test() { healthcheck_cassandra "${major_version}" - if [ "${SKIP_APPLY_SCHEMA}" = "true" ]; then + if [ "${SKIP_APPLY_SCHEMA}" = "false" ]; then apply_schema "$schema_version" "$primaryKeyspace" apply_schema "$schema_version" "$archiveKeyspace" fi