Fixed the http_proxy
This commit is contained in:
parent
03dc6c4879
commit
007ab6e503
|
@ -20,7 +20,7 @@ func (p *Provisioner) linuxInstallChefClient(
|
||||||
// Build up the command prefix
|
// Build up the command prefix
|
||||||
prefix := ""
|
prefix := ""
|
||||||
if p.HTTPProxy != "" {
|
if p.HTTPProxy != "" {
|
||||||
prefix += fmt.Sprintf("proxy_http='%s' ", p.HTTPProxy)
|
prefix += fmt.Sprintf("http_proxy='%s' ", p.HTTPProxy)
|
||||||
}
|
}
|
||||||
if p.NOProxy != nil {
|
if p.NOProxy != nil {
|
||||||
prefix += fmt.Sprintf("no_proxy='%s' ", strings.Join(p.NOProxy, ","))
|
prefix += fmt.Sprintf("no_proxy='%s' ", strings.Join(p.NOProxy, ","))
|
||||||
|
|
|
@ -58,9 +58,9 @@ func TestResourceProvider_linuxInstallChefClient(t *testing.T) {
|
||||||
}),
|
}),
|
||||||
|
|
||||||
Commands: map[string]bool{
|
Commands: map[string]bool{
|
||||||
"proxy_http='http://proxy.local' curl -LO https://www.chef.io/chef/install.sh": true,
|
"http_proxy='http://proxy.local' curl -LO https://www.chef.io/chef/install.sh": true,
|
||||||
"proxy_http='http://proxy.local' bash ./install.sh -v \"\"": true,
|
"http_proxy='http://proxy.local' bash ./install.sh -v \"\"": true,
|
||||||
"proxy_http='http://proxy.local' rm -f install.sh": 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{
|
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,
|
"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,
|
"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,
|
"rm -f install.sh": true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue