summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile30
1 files changed, 30 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
index 0d1b18ad..9e5db405 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,6 +1,7 @@
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
require 'puppet-syntax/tasks/puppet-syntax'
+require 'puppet-catalog-test'
# return list of modules, either
# submodules, custom or all modules
@@ -53,5 +54,34 @@ task :templates do
end
end
+desc "Compile hiera config for test_provider"
+task :test_provider_compile do
+ sh "cd tests/puppet/provider; bundle exec leap compile"
+end
+
+namespace :catalog do
+ PuppetCatalogTest::RakeTask.new(:all) do |t|
+ Rake::Task["test_provider_compile"].invoke
+ t.module_paths = ["puppet/modules"]
+ t.manifest_path = File.join("puppet","manifests", "site.pp")
+ t.facts = {
+ "operatingsystem" => "Debian",
+ "osfamily" => "Debian",
+ "operatingsystemmajrelease" => "8",
+ "debian_release" => "stable",
+ "debian_codename" => "jessie",
+ "lsbdistcodename" => "jessie",
+ "concat_basedir" => "/var/lib/puppet/concat",
+ "interfaces" => "eth0"
+ }
+
+ # crucial option for hiera integration
+ t.config_dir = File.join("tests/puppet") # expects hiera.yaml to be included in directory
+
+ # t.parser = "future"
+ t.verbose = true
+ end
+end
+
desc "Run all puppet checks required for CI (syntax , validate, spec, lint)"
task :test => [:syntax , :validate, :templates, :spec, :lint]