test/support/integration_test.rb in knife-solo-0.1.0 vs test/support/integration_test.rb in knife-solo-0.2.0.pre1

- old
+ new

@@ -13,11 +13,11 @@ include Loggable # Returns a name for the current test's server # that should be fairly unique. def server_name - "knife_solo-#{image_id}" + "knife-solo_#{self.class}" end # Shortcut to access the test runner def runner MiniTest::Unit.runner @@ -70,10 +70,17 @@ runner.tag_as_prepared(server) end # The prepare command to use on this server def prepare_command - "prepare" + "prepare #{omnibus_options}" + end + + def omnibus_options + return "" if ENV['CHEF_VERSION'].to_s.empty? + + v = `knife --version`.split(':') + v[0].strip == 'Chef' ? "--omnibus-version=#{v[1].strip}" : '' end # Provides the path to the runner's key file def key_file runner.key_file