lib/controlrepo/rake_tasks.rb in controlrepo-1.1.0 vs lib/controlrepo/rake_tasks.rb in controlrepo-2.0.0
- old
+ new
@@ -77,10 +77,14 @@
task :controlrepo_autotest_prep do
require 'controlrepo/testconfig'
@repo = Controlrepo.new
@config = Controlrepo::TestConfig.new("#{@repo.spec_dir}/controlrepo.yaml")
+ # Verify that all the files exist for the tests we have set up
+ @config.spec_tests.each { |test| @config.verify_spec_test(@repo,test) }
+ @config.acceptance_tests.each { |test| @config.verify_acceptance_test(@repo,test) }
+
# Deploy r10k to a temp dir
@config.r10k_deploy_local(@repo)
# Create the other directories we need
FileUtils.mkdir_p("#{@repo.tempdir}/spec/classes")
@@ -100,14 +104,14 @@
# Create Gemfile
@config.write_gemfile(@repo.tempdir)
# Deduplicate and write the tests (Spec and Acceptance)
- Controlrepo::Test.deduplicate(@config.tests).each do |test|
+ Controlrepo::Test.deduplicate(@config.spec_tests).each do |test|
@config.write_spec_test("#{@repo.tempdir}/spec/classes",test)
end
- @config.write_acceptance_tests("#{@repo.tempdir}/spec/acceptance",Controlrepo::Test.deduplicate(@config.tests))
+ @config.write_acceptance_tests("#{@repo.tempdir}/spec/acceptance",Controlrepo::Test.deduplicate(@config.acceptance_tests))
# Parse the current hiera config, modify, and write it to the temp dir
hiera_config = @repo.hiera_config
hiera_config.each do |setting,value|
if value.is_a?(Hash)