forked from voxpupuli/puppet-staging
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
24 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
fixtures: | ||
repositories: | ||
"stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib.git" | ||
symlinks: | ||
"staging": "#{source_dir}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
source :rubygems | ||
|
||
puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : ['>= 2.7'] | ||
gem 'puppet', puppetversion | ||
gem 'puppetlabs_spec_helper', '>= 0.1.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,16 @@ | ||
language: ruby | ||
rvm: | ||
- 1.8.7 | ||
- 1.9.2 | ||
- ree | ||
before_script: | ||
- 'git clone git://github.com/puppetlabs/hiera-puppet.git spec/fixtures/modules/hiera-puppet' | ||
- 'mkdir /home/vagrant/.puppet' | ||
- 'cp spec/fixtures/hiera.yaml /home/vagrant/.puppet/hiera.yaml' | ||
after_script: | ||
- 'rm /home/vagrant/.puppet/hiera.yaml' | ||
- 'rmdir /home/vagrant/.puppet' | ||
script: "rake spec" | ||
branches: | ||
only: | ||
- master | ||
env: | ||
- PUPPET_VERSION=2.6.12 | ||
- PUPPET_VERSION=2.7.13 | ||
- PUPPET_VERSION=2.7.6 | ||
- PUPPET_VERSION=2.7.9 | ||
matrix: | ||
exclude: | ||
- rvm: 1.9.2 | ||
env: PUPPET_VERSION=2.6.12 | ||
- PUPPET_VERSION=2.6.9 | ||
notifications: | ||
email: false | ||
gemfile: .gemfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,2 @@ | ||
require 'rubygems' | ||
require 'rake' | ||
require 'rspec/core/rake_task' | ||
|
||
task :default do | ||
system("rake -T") | ||
end | ||
|
||
task :specs => [:spec] | ||
|
||
desc "Run all rspec-puppet tests" | ||
RSpec::Core::RakeTask.new(:spec) do |t| | ||
t.rspec_opts = ['--color'] | ||
# ignores fixtures directory. | ||
t.pattern = 'spec/{classes,defines,unit}/**/*_spec.rb' | ||
end | ||
|
||
desc "Build puppet module package" | ||
task :build do | ||
# This will be deprecated once puppet-module is a face. | ||
begin | ||
Gem::Specification.find_by_name('puppet-module') | ||
rescue Gem::LoadError, NoMethodError | ||
require 'puppet/face' | ||
pmod = Puppet::Face['module', :current] | ||
pmod.build('./') | ||
end | ||
end | ||
|
||
desc "Check puppet manifests with puppet-lint" | ||
task :lint do | ||
# This requires pull request: https://github.com/rodjek/puppet-lint/pull/81 | ||
system("puppet-lint manifests") | ||
system("puppet-lint tests") | ||
end | ||
|
||
desc "Testing in virtual system." | ||
task :vm do | ||
require 'vagrant' | ||
env = Vagrant::Environment.new | ||
puts "Bringing up vagrant environment" | ||
env.cli("up") | ||
end | ||
|
||
desc "Unit test in virtual system." | ||
task :vm_test do | ||
require 'facter' | ||
unless Facter.value('virtual') | ||
Dir.chdir('tests') | ||
Dir.glob('**/*.pp').each do |f| | ||
system("puppet apply -v #{f}") | ||
end | ||
end | ||
end | ||
require 'puppetlabs_spec_helper/rake_tasks' |
Empty file.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,2 @@ | ||
require 'puppet' | ||
require 'rspec' | ||
require 'rspec-puppet' | ||
|
||
def param_value(subject, type, title, param) | ||
subject.resource(type, title).send(:parameters)[param.to_sym] | ||
end | ||
|
||
RSpec.configure do |c| | ||
c.module_path = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures/modules')) | ||
# Using an empty site.pp file to avoid: https://github.com/rodjek/rspec-puppet/issues/15 | ||
c.manifest_dir = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures/manifests')) | ||
# Use fixtures for config file mainly to support using our own hiera.yaml settings. | ||
# Pending: https://github.com/rodjek/rspec-puppet/pull/21 | ||
# c.config = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures/puppet.conf')) | ||
end | ||
require 'rubygems' | ||
require 'puppetlabs_spec_helper/module_spec_helper' |