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
7 changed files
with
109 additions
and
0 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,3 @@ | ||
fixtures: | ||
symlinks: | ||
ssh: "#{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,2 @@ | ||
Gemfile.lock | ||
*.swp |
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,37 @@ | ||
language: ruby | ||
bundler_args: --without development | ||
script: | ||
- bundle exec rake spec SPEC_OPTS='--format documentation' | ||
- bundle exec rake lint | ||
rvm: | ||
- 1.8.7 | ||
- 1.9.3 | ||
- 2.0.0 | ||
- 2.1.2 | ||
env: | ||
- PUPPET_GEM_VERSION="~> 2.7.0" | ||
- PUPPET_GEM_VERSION="~> 3.1.0" | ||
- PUPPET_GEM_VERSION="~> 3.2.0" | ||
- PUPPET_GEM_VERSION="~> 3.3.0" | ||
- PUPPET_GEM_VERSION="~> 3.4.0" | ||
- PUPPET_GEM_VERSION="~> 3.5.0" | ||
- PUPPET_GEM_VERSION="~> 3.6.0" | ||
matrix: | ||
fast_finish: true | ||
exclude: | ||
- rvm: 1.9.3 | ||
env: PUPPET_GEM_VERSION="~> 2.7.0" | ||
- rvm: 2.0.0 | ||
env: PUPPET_GEM_VERSION="~> 2.7.0" | ||
- rvm: 2.0.0 | ||
env: PUPPET_GEM_VERSION="~> 3.1.0" | ||
- rvm: 2.1.2 | ||
env: PUPPET_GEM_VERSION="~> 2.7.0" | ||
- rvm: 2.1.2 | ||
env: PUPPET_GEM_VERSION="~> 3.1.0" | ||
- rvm: 2.1.2 | ||
env: PUPPET_GEM_VERSION="~> 3.2.0" | ||
- rvm: 2.1.2 | ||
env: PUPPET_GEM_VERSION="~> 3.3.0" | ||
- rvm: 2.1.2 | ||
env: PUPPET_GEM_VERSION="~> 3.4.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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
source 'https://rubygems.org' | ||
|
||
group :development, :test do | ||
gem 'puppetlabs_spec_helper', :require => false | ||
gem 'puppet-lint', :require => false | ||
end | ||
|
||
if puppetversion = ENV['PUPPET_GEM_VERSION'] | ||
gem 'puppet', puppetversion, :require => false | ||
else | ||
gem 'puppet', :require => false | ||
end |
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,22 @@ | ||
require 'rubygems' | ||
require 'puppetlabs_spec_helper/rake_tasks' | ||
require 'puppet-lint/tasks/puppet-lint' | ||
PuppetLint.configuration.send('disable_80chars') | ||
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"] | ||
|
||
desc "Validate manifests, templates, and ruby files" | ||
task :validate do | ||
Dir['manifests/**/*.pp'].each do |manifest| | ||
sh "puppet parser validate --noop #{manifest}" | ||
end | ||
Dir['spec/**/*.rb','lib/**/*.rb'].each do |ruby_file| | ||
sh "ruby -c #{ruby_file}" unless ruby_file =~ /spec\/fixtures/ | ||
end | ||
Dir['templates/**/*.erb'].each do |template| | ||
sh "erb -P -x -T '-' #{template} | ruby -c" | ||
end | ||
end | ||
|
||
PuppetLint.configuration.send('disable_class_parameter_defaults') | ||
PuppetLint.configuration.fail_on_warnings = true | ||
task :default => [:spec, :lint, :validate] |
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,8 @@ | ||
require 'spec_helper' | ||
|
||
describe 'ssh' do | ||
let(:facts) {{ | ||
:osfamily => 'Debian', | ||
}} | ||
it { should compile.with_all_deps } | ||
end |
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,25 @@ | ||
require 'puppetlabs_spec_helper/module_spec_helper' | ||
|
||
RSpec.configure do |c| | ||
c.include PuppetlabsSpec::Files | ||
|
||
c.before :each do | ||
# Ensure that we don't accidentally cache facts and environment | ||
# between test cases. | ||
Facter::Util::Loader.any_instance.stubs(:load_all) | ||
Facter.clear | ||
Facter.clear_messages | ||
|
||
# Store any environment variables away to be restored later | ||
@old_env = {} | ||
ENV.each_key {|k| @old_env[k] = ENV[k]} | ||
|
||
if Gem::Version.new(`puppet --version`) >= Gem::Version.new('3.5') | ||
Puppet.settings[:strict_variables]=true | ||
end | ||
end | ||
|
||
c.after :each do | ||
PuppetlabsSpec::Files.cleanup | ||
end | ||
end |