From 007ab6e5039d13a86b7b302ddcb56dbc2c5c0b92 Mon Sep 17 00:00:00 2001 From: Jeroen de Korte Date: Fri, 3 Jul 2015 15:04:58 +0200 Subject: [PATCH] Fixed the http_proxy --- builtin/provisioners/chef/linux_provisioner.go | 2 +- builtin/provisioners/chef/linux_provisioner_test.go | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/builtin/provisioners/chef/linux_provisioner.go b/builtin/provisioners/chef/linux_provisioner.go index e14288437..d8cce95ae 100644 --- a/builtin/provisioners/chef/linux_provisioner.go +++ b/builtin/provisioners/chef/linux_provisioner.go @@ -20,7 +20,7 @@ func (p *Provisioner) linuxInstallChefClient( // Build up the command prefix prefix := "" if p.HTTPProxy != "" { - prefix += fmt.Sprintf("proxy_http='%s' ", p.HTTPProxy) + prefix += fmt.Sprintf("http_proxy='%s' ", p.HTTPProxy) } if p.NOProxy != nil { prefix += fmt.Sprintf("no_proxy='%s' ", strings.Join(p.NOProxy, ",")) diff --git a/builtin/provisioners/chef/linux_provisioner_test.go b/builtin/provisioners/chef/linux_provisioner_test.go index e41c5b8da..d50ae1a50 100644 --- a/builtin/provisioners/chef/linux_provisioner_test.go +++ b/builtin/provisioners/chef/linux_provisioner_test.go @@ -58,9 +58,9 @@ func TestResourceProvider_linuxInstallChefClient(t *testing.T) { }), Commands: map[string]bool{ - "proxy_http='http://proxy.local' curl -LO https://www.chef.io/chef/install.sh": true, - "proxy_http='http://proxy.local' bash ./install.sh -v \"\"": true, - "proxy_http='http://proxy.local' rm -f install.sh": true, + "http_proxy='http://proxy.local' curl -LO https://www.chef.io/chef/install.sh": true, + "http_proxy='http://proxy.local' bash ./install.sh -v \"\"": true, + "http_proxy='http://proxy.local' rm -f install.sh": true, }, }, @@ -77,11 +77,11 @@ func TestResourceProvider_linuxInstallChefClient(t *testing.T) { }), Commands: map[string]bool{ - "proxy_http='http://proxy.local' no_proxy='http://local.local,http://local.org' " + + "http_proxy='http://proxy.local' no_proxy='http://local.local,http://local.org' " + "curl -LO https://www.chef.io/chef/install.sh": true, - "proxy_http='http://proxy.local' no_proxy='http://local.local,http://local.org' " + + "http_proxy='http://proxy.local' no_proxy='http://local.local,http://local.org' " + "bash ./install.sh -v \"\"": true, - "proxy_http='http://proxy.local' no_proxy='http://local.local,http://local.org' " + + "http_proxy='http://proxy.local' no_proxy='http://local.local,http://local.org' " + "rm -f install.sh": true, }, },