lib/cucumber/chef/helpers/chef_client.rb in cucumber-chef-2.1.0.rc.1 vs lib/cucumber/chef/helpers/chef_client.rb in cucumber-chef-2.1.0.rc.2
- old
+ new
@@ -51,11 +51,10 @@
################################################################################
def chef_run_client(name,*args)
chef_config_client(name)
- artifacts =
log("removing artifacts #{Cucumber::Chef::Config[:artifacts].values.collect{|z| "$#{z}$" }.join(' ')}")
(command_run_remote(name, "/bin/rm -fv #{Cucumber::Chef::Config[:artifacts].values.join(' ')}") rescue nil)
log("running chef client on container $#{name}$")
@@ -107,21 +106,19 @@
def chef_client_artifacts(name)
# this is messy and needs to be refactored into a more configurable
# solution; but for now this should do the trick
- ssh_private_key_file = Cucumber::Chef.locate(:file, ".cucumber-chef", "id_rsa-#{Cucumber::Chef::Config[:lab_user]}")
- File.chmod(0400, ssh_private_key_file)
-
ssh = ZTK::SSH.new
- ssh.config.proxy_host_name = $test_lab.labs_running.first.public_ip_address
- ssh.config.proxy_user = Cucumber::Chef::Config[:lab_user]
- ssh.config.proxy_keys = ssh_private_key_file
+ ssh.config.proxy_host_name = $test_lab.ip
+ ssh.config.proxy_port = $test_lab.port
+ ssh.config.proxy_user = Cucumber::Chef.lab_user
+ ssh.config.proxy_keys = Cucumber::Chef.lab_identity
ssh.config.host_name = name
- ssh.config.user = Cucumber::Chef::Config[:lxc_user]
- ssh.config.keys = ssh_private_key_file
+ ssh.config.user = Cucumber::Chef.lxc_user
+ ssh.config.keys = Cucumber::Chef.lxc_identity
feature_file = $scenario.file_colon_line.split(":").first
feature_line = $scenario.file_colon_line.split(":").last
scenario_tag = $scenario.name.gsub(" ", "_")