Fixes configuration for Azure integrationt tests (#2941)

Updates some calls in train so we can access the configuration options
for some integration tests.

Signed-off-by: David McCown <dmccown@chef.io>
This commit is contained in:
David McCown 2018-04-11 14:13:23 -05:00 committed by Jared Quick
parent eb3ae2aca4
commit 3c2ab6593a

View file

@ -162,7 +162,8 @@ namespace :test do
sh("cd #{integration_dir}/build/ && terraform workspace new #{tf_workspace}")
# Generate Azure crendentials
creds = Train.create('azure').connection.connect
connection = Train.create('azure').connection
creds = connection.options
# Determine the storage account name and the admin password
sa_name = (0...15).map { (65 + rand(26)).chr }.join.downcase
@ -208,7 +209,8 @@ namespace :test do
abort("You must either call the top-level test:azure task, or set the INSPEC_TERRAFORM_ENV variable.") unless tf_workspace
puts '----> Cleanup'
creds = Train.create('azure').connection.connect
connection = Train.create('azure').connection
creds = connection.options
cmd = ""
cmd += "cd #{integration_dir}/build/ && terraform destroy -force "