summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2019-05-10 17:50:12 -0700
committerGitHub <noreply@github.com>2019-05-10 17:50:12 -0700
commit7df11900e079f82e73f7469bf22013f0fc49e213 (patch)
tree9b9f83d61277891bfc096046d91bb4a7298af3a5 /spec
parentd4188cfb5e6ca74a5ef3bda4d7c89ff249282360 (diff)
parentf52f71d4c98ea876fc50ebbe023de22871937069 (diff)
downloadchef-7df11900e079f82e73f7469bf22013f0fc49e213.tar.gz
Merge pull request #8507 from MarkGibbons/solaris_bootstrap
Use exports compatibile with /bin/sh in the bootstrap script
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/knife/bootstrap_spec.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/unit/knife/bootstrap_spec.rb b/spec/unit/knife/bootstrap_spec.rb
index f24dec6fa7..5280e3b64b 100644
--- a/spec/unit/knife/bootstrap_spec.rb
+++ b/spec/unit/knife/bootstrap_spec.rb
@@ -131,6 +131,28 @@ describe Chef::Knife::Bootstrap do
end
end
+ context "with --bootstrap-proxy" do
+ let(:bootstrap_cli_options) { [ "--bootstrap-proxy", "1.1.1.1" ] }
+ let(:rendered_template) do
+ knife.merge_configs
+ knife.render_template
+ end
+ it "configures the https_proxy environment variable in the bootstrap template correctly" do
+ expect(rendered_template).to match(%r{https_proxy="1.1.1.1" export https_proxy})
+ end
+ end
+
+ context "with --bootstrap-no-proxy" do
+ let(:bootstrap_cli_options) { [ "--bootstrap-no-proxy", "localserver" ] }
+ let(:rendered_template) do
+ knife.merge_configs
+ knife.render_template
+ end
+ it "configures the https_proxy environment variable in the bootstrap template correctly" do
+ expect(rendered_template).to match(%r{no_proxy="localserver" export no_proxy})
+ end
+ end
+
context "with :bootstrap_template and :template_file cli options" do
let(:bootstrap_cli_options) { [ "--bootstrap-template", "my-template", "other-template" ] }