Skip to content

Commit

Permalink
tests: Fix shell quoting in the test scripts
Browse files Browse the repository at this point in the history
This patch fixes some shell quoting issues in the test scripts, found by
shellcheck.
  • Loading branch information
albertito committed Nov 17, 2024
1 parent 4460481 commit 5a08a71
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tests/all.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# The tests are run from the repository root.
cd "$(realpath `dirname ${0}`)/../"
cd "$(realpath "$(dirname "$0")/../" )"

set -ev

Expand Down
4 changes: 2 additions & 2 deletions tests/coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
set -e

# The tests are run from the repository root.
cd "$(realpath `dirname ${0}`)/../"
cd "$(realpath "$(dirname "$0")/../" )"

# Recreate the coverage output directory, to avoid including stale results
# from previous runs.
Expand All @@ -19,7 +19,7 @@ go test \
-covermode=count \
-coverpkg=./... \
./... \
-args -test.gocoverdir=${COVER_DIR}/go/
-args -test.gocoverdir="${COVER_DIR}/go/"

# Run external tests in coverage mode. They will run in coverage mode due to
# $GOCOVERDIR being set.
Expand Down
8 changes: 4 additions & 4 deletions tests/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ trap "exit 2" INT # Ctrl-C, make sure we fail in that case.
trap "kill 0" EXIT # Kill children on exit.

# The tests are run from the repository root.
cd "$(realpath `dirname ${0}`)/../"
cd "$(realpath "$(dirname "$0")/../" )"

# Build the dnss binary.
if [ "${GOCOVERDIR}" != "" ]; then
Expand Down Expand Up @@ -118,11 +118,11 @@ function get() {
}

function generate_certs() {
mkdir -p .certs/$1
mkdir -p ".certs/$1"
(
cd .certs/$1
cd ".certs/$1"
go run ../../tests/generate_cert.go \
-ca -duration=1h --host=$1
-ca -duration=1h --host="$1"
)
}

Expand Down

0 comments on commit 5a08a71

Please sign in to comment.