From 42488b04b47ec3fd87f1d45ec3fa90b588545ca1 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Tue, 2 Jul 2013 19:22:35 +0200 Subject: Add basic testing infrastructure --- Rakefile | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Rakefile (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..0d1f018 --- /dev/null +++ b/Rakefile @@ -0,0 +1,9 @@ +require 'puppetlabs_spec_helper/rake_tasks' +require 'puppet-lint/tasks/puppet-lint' + +PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "vendor/**/*.pp"] +PuppetLint.configuration.log_format = '%{path}:%{linenumber}:%{KIND}: %{message}' +PuppetLint.configuration.send("disable_class_inherits_from_params_class") +PuppetLint.configuration.send("disable_80chars") + +task :default => [:spec, :lint] -- cgit v1.2.3 From 9c2c7140876bbe20a9871543ba28b7522acdb213 Mon Sep 17 00:00:00 2001 From: Tomas Barton Date: Sat, 12 Oct 2013 16:45:19 +0200 Subject: testing infrastructure --- Rakefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index 0d1f018..c0bab20 100644 --- a/Rakefile +++ b/Rakefile @@ -1,9 +1,21 @@ +require 'bundler' +Bundler.require(:rake) + require 'puppetlabs_spec_helper/rake_tasks' require 'puppet-lint/tasks/puppet-lint' +require 'rspec-system/rake_task' PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "vendor/**/*.pp"] PuppetLint.configuration.log_format = '%{path}:%{linenumber}:%{KIND}: %{message}' PuppetLint.configuration.send("disable_class_inherits_from_params_class") PuppetLint.configuration.send("disable_80chars") +# use librarian-puppet to manage fixtures instead of .fixtures.yml +# offers more possibilities like explicit version management, forge downloads,... +task :librarian_spec_prep do + sh "librarian-puppet install --path=spec/fixtures/modules/" +end +task :spec_prep => :librarian_spec_prep + + task :default => [:spec, :lint] -- cgit v1.2.3 From c5f36700d044fbdf61b17e105bddd2147ff22f29 Mon Sep 17 00:00:00 2001 From: Tomas Barton Date: Sun, 13 Oct 2013 18:42:41 +0200 Subject: debugging travis and librarian --- Rakefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index c0bab20..6b92f24 100644 --- a/Rakefile +++ b/Rakefile @@ -13,7 +13,9 @@ PuppetLint.configuration.send("disable_80chars") # use librarian-puppet to manage fixtures instead of .fixtures.yml # offers more possibilities like explicit version management, forge downloads,... task :librarian_spec_prep do - sh "librarian-puppet install --path=spec/fixtures/modules/" + sh "librarian-puppet install --path=spec/fixtures/modules/" + sh 'ls -laF spec/fixtures/modules' + sh 'ls -laF spec/fixtures/modules/munin/manifests' end task :spec_prep => :librarian_spec_prep -- cgit v1.2.3 From dcea01c89c802c4055e2e99a4ed17576a4c5581b Mon Sep 17 00:00:00 2001 From: Tomas Barton Date: Sun, 13 Oct 2013 19:00:48 +0200 Subject: linking current directory to fixtures --- Rakefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index 6b92f24..3bc7abd 100644 --- a/Rakefile +++ b/Rakefile @@ -14,8 +14,11 @@ PuppetLint.configuration.send("disable_80chars") # offers more possibilities like explicit version management, forge downloads,... task :librarian_spec_prep do sh "librarian-puppet install --path=spec/fixtures/modules/" + pwd = `pwd`.strip + unless File.directory?("#{pwd}/spec/fixtures/modules/munin") + sh "ln -s #{pwd} #{pwd}/spec/fixtures/modules/munin" + end sh 'ls -laF spec/fixtures/modules' - sh 'ls -laF spec/fixtures/modules/munin/manifests' end task :spec_prep => :librarian_spec_prep -- cgit v1.2.3 From 26224742940b06335bca3cb8f5e09d0c0a5cabef Mon Sep 17 00:00:00 2001 From: Tomas Barton Date: Sun, 13 Oct 2013 20:24:20 +0200 Subject: Class[] -> Class[] requirement replaced by an anchor --- Rakefile | 1 - 1 file changed, 1 deletion(-) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index 3bc7abd..e9e821a 100644 --- a/Rakefile +++ b/Rakefile @@ -18,7 +18,6 @@ task :librarian_spec_prep do unless File.directory?("#{pwd}/spec/fixtures/modules/munin") sh "ln -s #{pwd} #{pwd}/spec/fixtures/modules/munin" end - sh 'ls -laF spec/fixtures/modules' end task :spec_prep => :librarian_spec_prep -- cgit v1.2.3 From 27c9a5dbc2083dcc20d059008702dd3f75382bcc Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 10 Oct 2014 11:54:10 +0200 Subject: more linting and latest puppet-lint support --- Rakefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index e9e821a..f3c7f29 100644 --- a/Rakefile +++ b/Rakefile @@ -5,10 +5,12 @@ require 'puppetlabs_spec_helper/rake_tasks' require 'puppet-lint/tasks/puppet-lint' require 'rspec-system/rake_task' -PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "vendor/**/*.pp"] -PuppetLint.configuration.log_format = '%{path}:%{linenumber}:%{KIND}: %{message}' -PuppetLint.configuration.send("disable_class_inherits_from_params_class") -PuppetLint.configuration.send("disable_80chars") +Rake::Task[:lint].clear +PuppetLint::RakeTask.new :lint do |config| + config.ignore_paths = ["spec/**/*.pp", "vendor/**/*.pp"] + config.log_format = '%{path}:%{linenumber}:%{KIND}: %{message}' + config.disable_checks = [ "class_inherits_from_params_class", "80chars" ] +end # use librarian-puppet to manage fixtures instead of .fixtures.yml # offers more possibilities like explicit version management, forge downloads,... -- cgit v1.2.3