summaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
authorSerdar Sutay <serdar@opscode.com>2014-10-24 13:33:44 -0700
committerSerdar Sutay <serdar@opscode.com>2014-10-24 13:33:44 -0700
commitadf1995120d81e9083e7b0650ad9afcab444aa85 (patch)
treeb0fc3e24d2b08757d9addf1ae7491e57f1cf30c5 /spec/unit
parent5d9ab649c4898bf4050ecb527e34a9071e4f10ab (diff)
parent8802793016eff0c543d69fafc807b81f425d689f (diff)
downloadchef-adf1995120d81e9083e7b0650ad9afcab444aa85.tar.gz
Merge pull request #2196 from ClogenyTechnologies/sid/fix-bootstrap-options-precedence
[knife-ec2]Command-line options do not take precedence over knife.rb configuration (#247)
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/knife/bootstrap_spec.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/spec/unit/knife/bootstrap_spec.rb b/spec/unit/knife/bootstrap_spec.rb
index 70cdd20f35..2599e44a56 100644
--- a/spec/unit/knife/bootstrap_spec.rb
+++ b/spec/unit/knife/bootstrap_spec.rb
@@ -418,12 +418,6 @@ describe Chef::Knife::Bootstrap do
context "from the knife config file" do
let(:knife_ssh) do
knife.name_args = ["config.example.com"]
- knife.config[:ssh_user] = nil
- knife.config[:ssh_port] = nil
- knife.config[:ssh_gateway] = nil
- knife.config[:forward_agent] = nil
- knife.config[:identity_file] = nil
- knife.config[:host_key_verify] = nil
Chef::Config[:knife][:ssh_user] = "curiosity"
Chef::Config[:knife][:ssh_port] = "2430"
Chef::Config[:knife][:forward_agent] = true
@@ -431,6 +425,8 @@ describe Chef::Knife::Bootstrap do
Chef::Config[:knife][:ssh_gateway] = "towel.blinkenlights.nl"
Chef::Config[:knife][:host_key_verify] = true
knife.stub(:render_template).and_return("")
+ knife.config = {}
+ knife.merge_configs
knife.knife_ssh
end