[Fuego] [PATCH 02/18] add http proxy

Bird, Timothy Tim.Bird at sony.com
Tue Oct 17 00:12:20 UTC 2017



> -----Original Message-----
> From: fuego-bounces at lists.linuxfoundation.org [mailto:fuego-
> bounces at lists.linuxfoundation.org] On Behalf Of Song Cai
> Sent: Friday, October 13, 2017 3:05 AM
> To: fuego at lists.linuxfoundation.org
> Subject: [Fuego] [PATCH 02/18] add http proxy
> 
> add http proxy for curl
> 
> Signed-off-by: Song Cai <cais.fnst at cn.fujitsu.com>
> ---
>  engine/tests/Functional.curl/fuego_test.sh | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/engine/tests/Functional.curl/fuego_test.sh
> b/engine/tests/Functional.curl/fuego_test.sh
> index 90d24dd..5f8d71a 100755
> --- a/engine/tests/Functional.curl/fuego_test.sh
> +++ b/engine/tests/Functional.curl/fuego_test.sh
> @@ -1,5 +1,6 @@
>  function test_run {
> -    report "if curl -o test.html www.baidu.com > /dev/null; then echo 'TEST-1
> OK'; else echo 'TEST-1 FAILED'; fi;\
> +    report "export http_proxy=$http_proxy;\
> +        if curl -o test.html www.baidu.com > /dev/null; then echo 'TEST-1 OK';
> else echo 'TEST-1 FAILED'; fi;\
>      if curl -i -r 0-1024 http://www.sina.com.cn -o sina_part1.html > /dev/null;
> then echo 'TEST-2 OK'; else echo 'TEST-2 FAILED'; fi;\
>      if curl -v www.baidu.com > /dev/null; then echo 'TEST-3 OK'; else echo
> 'TEST-3 FAILED'; fi;\
>      if curl -V > /dev/null; then echo 'TEST-4 OK'; else echo 'TEST-4 FAILED'; fi;\
> --
> 2.9.3.windows.3
> 

This applies the proxy from the docker container onto the target, which may
not be correct.  We don't currently support it, but in the future we plan
to support target boards operating on different networks than the host.

I think the board should have its own proxy set up correctly, and not rely
on the test to set it.  That is, why isn't http_proxy already set in the board's
environment? (and thus the fuego test account gets that setting when
it executes commands?)   I'm willing to be convinced if there's a valid
use case for this, though.

It seems to me that testing that the environment required for curl
(including the proxy setting) is actually part of the test.

For now, NAK.
 -- Tim




More information about the Fuego mailing list