Sha256: ca4f6a9edc36cc1f06386a1de311f42bff7da18cf9ccb6ad211ef8af6698d402

Contents?: true

Size: 1.63 KB

Versions: 3

Compression:

Stored size: 1.63 KB

Contents

require 'rake'
require 'rspec/core/rake_task'
require 'puppet-lint/tasks/puppet-lint'
require 'puppetlabs_spec_helper/rake_tasks'

desc 'Run syntax, lint and acceptance tests'
task :test do
  Rake::Task[:syntax].invoke
  Rake::Task[:lint].invoke
  Rake::Task[:acceptance].invoke
end

# puppet-lint options
Rake::Task[:lint].clear
PuppetLint::RakeTask.new :lint do |config|
  config.ignore_paths = ['spec/**/*.pp']
  config.log_format = '%{path}:%{line}:%{check}:%{KIND}:%{message}'
  config.disable_checks = [ 'class_inherits_from_params_class', '80chars' ]
  config.fail_on_warnings = false
end

desc 'Run acceptance tests (VirtualBox)'
task :acceptance, [:all] do |t, args|

  # beaker default options
  ENV['PUPPET_INSTALL_TYPE'] = 'agent'
  ENV['BEAKER_destroy'] = 'onpass'

  all = args[:all]

  unless all.nil?
    Rake::Task['beaker:ubuntu-server-1404-x64'].invoke
  end

  Rake::Task['beaker:ubuntu-server-1604-x64'].invoke
end

desc 'Run acceptance tests (Docker/Ubuntu 1404)'
task :acceptance_docker1404 do

  # beaker default options
  ENV['PUPPET_INSTALL_TYPE'] = 'agent'
  ENV['BEAKER_destroy'] = 'onpass'

  ENV['BEAKER_set'] = 'docker/ubuntu-server-1404-x64'

  Rake::Task['beaker'].invoke
end

desc 'Run acceptance tests (Docker/Ubuntu 1604)'
task :acceptance_docker1604 do

  # beaker default options
  ENV['PUPPET_INSTALL_TYPE'] = 'agent'
  ENV['BEAKER_destroy'] = 'onpass'

  ENV['BEAKER_set'] = 'docker/ubuntu-server-1604-x64'

  Rake::Task['beaker'].invoke
end

# remove undesired rake tasks
task :build => []; Rake::Task[:build].clear
task :clean => []; Rake::Task[:clean].clear
task :default => []; Rake::Task[:default].clear
task :default => :test

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
puppet-magnum-4.0.2 generator_files/util/Rakefile.erb
puppet-magnum-4.0.1 generator_files/util/Rakefile.erb
puppet-magnum-4.0.0 generator_files/util/Rakefile.erb