lib/onceover/testconfig.rb in onceover-3.2.7 vs lib/onceover/testconfig.rb in onceover-3.2.8
- old
+ new
@@ -145,11 +145,11 @@
end
end
def pre_condition
# Read all the pre_conditions and return the string
- spec_dir = Onceover::Controlrepo.new.spec_dir
+ spec_dir = Onceover::Controlrepo.new(@opts).spec_dir
puppetcode = []
Dir["#{spec_dir}/pre_conditions/*.pp"].each do |condition_file|
logger.debug "Reading pre_conditions from #{condition_file}"
puppetcode << File.read(condition_file)
end
@@ -219,9 +219,10 @@
prod_dir = "#{repo.tempdir}/#{repo.environmentpath}/production"
Dir.chdir(prod_dir) do
install_cmd = "r10k puppetfile install --verbose --color --puppetfile #{repo.puppetfile}"
logger.debug "Running #{install_cmd} from #{prod_dir}"
system(install_cmd)
+ raise 'r10k could not install all required modules' unless $?.success?
end
else
raise "#{repo.tempdir} is not a directory"
end
end