mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Added the HTTPS proxy option
This commit is contained in:
parent
007ab6e503
commit
1c14bfd04d
@ -22,6 +22,9 @@ func (p *Provisioner) linuxInstallChefClient(
|
||||
if p.HTTPProxy != "" {
|
||||
prefix += fmt.Sprintf("http_proxy='%s' ", p.HTTPProxy)
|
||||
}
|
||||
if p.HTTPSProxy != "" {
|
||||
prefix += fmt.Sprintf("https_proxy='%s' ", p.HTTPSProxy)
|
||||
}
|
||||
if p.NOProxy != nil {
|
||||
prefix += fmt.Sprintf("no_proxy='%s' ", strings.Join(p.NOProxy, ","))
|
||||
}
|
||||
|
@ -64,6 +64,24 @@ func TestResourceProvider_linuxInstallChefClient(t *testing.T) {
|
||||
},
|
||||
},
|
||||
|
||||
"HTTPSProxy": {
|
||||
Config: testConfig(t, map[string]interface{}{
|
||||
"https_proxy": "https://proxy.local",
|
||||
"node_name": "nodename1",
|
||||
"prevent_sudo": true,
|
||||
"run_list": []interface{}{"cookbook::recipe"},
|
||||
"server_url": "https://chef.local",
|
||||
"validation_client_name": "validator",
|
||||
"validation_key_path": "validator.pem",
|
||||
}),
|
||||
|
||||
Commands: map[string]bool{
|
||||
"https_proxy='https://proxy.local' curl -LO https://www.chef.io/chef/install.sh": true,
|
||||
"https_proxy='https://proxy.local' bash ./install.sh -v \"\"": true,
|
||||
"https_proxy='https://proxy.local' rm -f install.sh": true,
|
||||
},
|
||||
},
|
||||
|
||||
"NOProxy": {
|
||||
Config: testConfig(t, map[string]interface{}{
|
||||
"http_proxy": "http://proxy.local",
|
||||
|
Loading…
Reference in New Issue
Block a user