* broken test * don't expand filenames into options * fix for ./test_env.sh -h => ./test_env.sh: line 15: usage: command not found
@@ -34,7 +34,7 @@ function wait_for_service {
while ! nc -z localhost 6060; do
sleep 0.5
((count ++))
- if [[ count == 21 ]]; then
+ if [[ $count == 21 ]]; then
fail "$@"
fi
done
@@ -40,7 +40,7 @@ function setup_tests() {
while ! nc -z localhost 9999; do
- if [[ count == 41 ]]; then
+ if [[ $count == 41 ]]; then
fail "mock server not up after 20s"
@@ -2,6 +2,14 @@
BASE="./tests"
+usage() {
+ echo "Usage:"
+ echo " ./wizard.sh -h Display this help message."
+ echo " ./test_env.sh -d ./tests Create test environment in './tests' folder"
+ exit 0
+}
+
while [[ $# -gt 0 ]]
do
key="${1}"
@@ -111,14 +119,4 @@ main() {
}
-
-usage() {
- echo "Usage:"
- echo " ./wizard.sh -h Display this help message."
- echo " ./env_test.sh -d ./tests Create test environment in './tests' folder"
- exit 0
-}
main
@@ -140,7 +140,7 @@ function down
rm -rf cs-firewall-bouncer-*
rm -f crowdsec-release.tgz
rm -f cs-firewall-bouncer.tgz
- rm *.md5
+ rm -- *.md5
function assert_equal