summaryrefslogtreecommitdiff
path: root/tests/setup_proxy_test
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2022-06-28 12:20:29 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2022-06-28 12:21:50 +0200
commitc51ebcb7f5b3f093e6b7bbffcc1213d83f30c86f (patch)
tree00f442525abb10e60b4d9448cb609e7e37929d3c /tests/setup_proxy_test
parent1eca06e13bcdbad76671ebc9ab2fb40de3b0830d (diff)
downloadalpine-conf-c51ebcb7f5b3f093e6b7bbffcc1213d83f30c86f.zip
tests: do not run atf_check in a subshell
We can not pipe to atf_shell as it will make it run in a subshell and will not handle failures properly. Fixes commit ab67ab0733c2 (setup-proxy: fix empty proxy)
Diffstat (limited to 'tests/setup_proxy_test')
-rwxr-xr-xtests/setup_proxy_test5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/setup_proxy_test b/tests/setup_proxy_test
index e825796..6fab883 100755
--- a/tests/setup_proxy_test
+++ b/tests/setup_proxy_test
@@ -42,10 +42,11 @@ setup_proxy_interactive_none_body() {
mkdir -p etc/profile.d
touch etc/profile.d/proxy.sh
- echo none | atf_check -s exit:0 \
+ echo none > answers
+ atf_check -s exit:0 \
-o match:"HTTP/FTP proxy URL" \
-e empty \
- setup-proxy
+ setup-proxy < answers
if test -e etc/profile.d/proxy.sh; then
atf_fail "etc/profile.d/proxy.sh was not removed"