From: Stéphane Graber Date: Tue, 1 Apr 2014 01:42:58 +0000 (-0400) Subject: tests: Also propagate the https proxy X-Git-Tag: lxc-1.1.0.alpha1~181 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=198a3f10d2e9d28a3713abd8e63e02524240dbf6;p=thirdparty%2Flxc.git tests: Also propagate the https proxy Signed-off-by: Stéphane Graber Signed-off-by: Serge Hallyn --- diff --git a/src/tests/lxc-test-unpriv b/src/tests/lxc-test-unpriv index 01ae8282f..bbe1e08cf 100755 --- a/src/tests/lxc-test-unpriv +++ b/src/tests/lxc-test-unpriv @@ -51,11 +51,9 @@ cleanup() { } run_cmd() { - if [ -n "${http_proxy:-}" ]; then - sudo -i -u $TUSER env http_proxy=$http_proxy XDG_RUNTIME_DIR=/run/user/$(id -u $TUSER) $* - else - sudo -i -u $TUSER env XDG_RUNTIME_DIR=/run/user/$(id -u $TUSER) $* - fi + sudo -i -u $TUSER \ + env http_proxy=${http_proxy:-} https_proxy=${https_proxy:-} \ + XDG_RUNTIME_DIR=/run/user/$(id -u $TUSER) $* } # create a test user diff --git a/src/tests/lxc-test-usernic.in b/src/tests/lxc-test-usernic.in index 61535080c..93af62303 100755 --- a/src/tests/lxc-test-usernic.in +++ b/src/tests/lxc-test-usernic.in @@ -57,11 +57,9 @@ cleanup() { } run_cmd() { - if [ -n "${http_proxy:-}" ]; then - sudo -i -u usernic-user env http_proxy=$http_proxy XDG_RUNTIME_DIR=/run/user/$(id -u usernic-user) $* - else - sudo -i -u usernic-user env XDG_RUNTIME_DIR=/run/user/$(id -u usernic-user) $* - fi + sudo -i -u usernic-user \ + env http_proxy=${http_proxy:-} https_proxy=${https_proxy:-} \ + XDG_RUNTIME_DIR=/run/user/$(id -u usernic-user) $* } ARCH=i386