diff --git a/smoketest.bash b/smoketest.bash index 7bc15962b..ab0245d90 100755 --- a/smoketest.bash +++ b/smoketest.bash @@ -82,7 +82,7 @@ for file in "${FILES[@]}"; do CMD+=(-f "${file}") done -HOSTSFILE="${HOSTSFILE:-~/.hosts}" +HOSTSFILE="${HOSTSFILE:-$HOME/.hosts}" cleanup() { DOWN_FLAGS=('--remove-orphans') @@ -114,7 +114,7 @@ setupUserHosts() { truncate -s 0 "${HOSTSFILE}" for file in "${FILES[@]}" ; do hosts="$(yq '.services.*.hostname' "${file}" | grep -v null | sed -e 's/^/localhost /')" - echo "${hosts}" >> ~/.hosts + echo "${hosts}" >> "${HOSTSFILE}" done } setupUserHosts diff --git a/smoketest/containers/smoketest_pod.bash b/smoketest/containers/smoketest_pod.bash index eea4fcdaf..4bddfe954 100755 --- a/smoketest/containers/smoketest_pod.bash +++ b/smoketest/containers/smoketest_pod.bash @@ -3,7 +3,7 @@ set -x set -e -HOSTSFILE="${HOSTSFILE:-~/.hosts}" +HOSTSFILE="${HOSTSFILE:-$HOME/.hosts}" cleanup() { podman-compose --in-pod=1 \ @@ -30,7 +30,7 @@ cleanup # --user=0 \ # --security-opt label=disable \ # -v "${XDG_RUNTIME_DIR}/podman/podman.sock:/tmp/docker.sock:Z" \ -# -v "${HOME}/.hosts:/tmp/hosts" \ +# -v "${HOSTSFILE}:/tmp/hosts" \ # dvdarias/docker-hoster setupUserHosts() {