-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from xaque208/testing
Begin testing the module
- Loading branch information
Showing
9 changed files
with
111 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,4 @@ | ||
.DS_Store | ||
pkg/ | ||
*.swp | ||
*.swo |
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 @@ | ||
--- | ||
language: ruby | ||
bundler_args: --without development | ||
before_install: rm Gemfile.lock || true | ||
rvm: | ||
- 1.9.3 | ||
- 2.0.0 | ||
- 2.1.0 | ||
script: bundle exec rake test | ||
env: | ||
- PUPPET_VERSION="~> 3.6.0" STRICT_VARIABLES=yes | ||
- PUPPET_VERSION="~> 3.7.0" STRICT_VARIABLES=yes |
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 @@ | ||
source "https://rubygems.org" | ||
|
||
|
||
group :test do | ||
gem "rake" | ||
gem "puppet", ENV['PUPPET_VERSION'] || '~> 3.6.0' | ||
gem "puppet-lint" | ||
gem 'rspec' | ||
gem 'rspec-core' | ||
gem 'rspec-mocks' | ||
gem 'rspec-expectations' | ||
gem "rspec-puppet", :git => 'https://github.com/rodjek/rspec-puppet.git' | ||
gem "puppet-syntax" | ||
gem "puppetlabs_spec_helper" | ||
end | ||
|
||
group :development do | ||
gem "travis" | ||
gem "travis-lint" | ||
gem "puppet-blacksmith" | ||
gem "metadata-json-lint" | ||
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,50 @@ | ||
require 'puppetlabs_spec_helper/rake_tasks' | ||
require 'puppet-lint/tasks/puppet-lint' | ||
require 'puppet-syntax/tasks/puppet-syntax' | ||
|
||
# These two gems aren't always present, for instance | ||
# on Travis with --without development | ||
begin | ||
require 'puppet_blacksmith/rake_tasks' | ||
rescue LoadError | ||
end | ||
|
||
PuppetLint.configuration.relative = true | ||
PuppetLint.configuration.send("disable_80chars") | ||
PuppetLint.configuration.log_format = "%{path}:%{linenumber}:%{check}:%{KIND}:%{message}" | ||
PuppetLint.configuration.fail_on_warnings = true | ||
|
||
# Forsake support for Puppet 2.6.2 for the benefit of cleaner code. | ||
# http://puppet-lint.com/checks/class_parameter_defaults/ | ||
PuppetLint.configuration.send('disable_class_parameter_defaults') | ||
# http://puppet-lint.com/checks/class_inherits_from_params_class/ | ||
PuppetLint.configuration.send('disable_class_inherits_from_params_class') | ||
|
||
PuppetLint.configuration.send('disable_case_without_default') | ||
#PuppetLint.configuration.send('disable_quoted_booleans') | ||
|
||
exclude_paths = [ | ||
"pkg/**/*", | ||
"vendor/**/*", | ||
"spec/**/*", | ||
] | ||
PuppetLint.configuration.ignore_paths = exclude_paths | ||
PuppetSyntax.exclude_paths = exclude_paths | ||
|
||
desc "Run acceptance tests" | ||
RSpec::Core::RakeTask.new(:acceptance) do |t| | ||
t.pattern = 'spec/acceptance' | ||
end | ||
|
||
task :metadata do | ||
sh "metadata-json-lint metadata.json" | ||
end | ||
|
||
desc "Run syntax, lint, and spec tests." | ||
task :test => [ | ||
:syntax, | ||
:lint, | ||
:spec, | ||
#:metadata, | ||
] | ||
|
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 @@ | ||
require 'spec_helper' | ||
|
||
describe 'ssh' do | ||
let(:facts) { | ||
{ | ||
:operatingsystem => 'OpenBSD', | ||
:concat_basedir => '/dne' | ||
} | ||
} | ||
it { should contain_class('ssh') } | ||
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 @@ | ||
../../../../files |
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 @@ | ||
../../../../manifests |
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 @@ | ||
../../../../templates |
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 'puppetlabs_spec_helper/module_spec_helper' | ||
|
||
fixture_path = File.expand_path(File.join(__FILE__, '..', 'fixtures')) | ||
|
||
RSpec.configure do |c| | ||
c.module_path = File.join(fixture_path, 'modules') | ||
c.manifest_dir = File.join(fixture_path, 'manifests') | ||
end |