lib/vcloud/tools/tester/user_parameters.rb in vcloud-tools-tester-0.2.0 vs lib/vcloud/tools/tester/user_parameters.rb in vcloud-tools-tester-0.3.0
- old
+ new
@@ -4,13 +4,13 @@
module Tools
module Tester
class UserParameters
attr_reader :user_params
- def initialize(config_file, expected_user_params)
+ def initialize(config_file, expected_params)
@config_file = config_file
- @expected_user_params = expected_user_params || []
+ @expected_params = expected_params || []
parse_config
end
private
@@ -25,14 +25,14 @@
end
all_config = YAML::load_file(@config_file)
@user_params = all_config.fetch(organization) do
- raise "Invalid FOG_CREDENTIAL environment variable value '#{organization}'"
+ raise "No matching organisation was found in #{@config_file} for FOG_CREDENTIAL value '#{organization}'"
end
defined_keys = @user_params.keys
- missing_params = @expected_user_params - defined_keys
+ missing_params = @expected_params - defined_keys
if missing_params.any?
raise "Required parameters not defined in #{@config_file}: " + missing_params.join(", ")
end
end
end