-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added lint and spec tests, automated forge builds
- Loading branch information
1 parent
fc36f04
commit b23b6d2
Showing
16 changed files
with
210 additions
and
3 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,6 @@ | ||
fixtures: | ||
repositories: | ||
apt: "git://github.com/puppetlabs/puppetlabs-apt.git" | ||
stdlib: "git://github.com/puppetlabs/puppetlabs-stdlib.git" | ||
symlinks: | ||
curator: "#{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 | ||
spec/fixtures |
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,35 @@ | ||
--- | ||
language: ruby | ||
before_install: | ||
- bundle -v | ||
- rm Gemfile.lock || true | ||
- gem update --system | ||
- gem update bundler | ||
- gem --version | ||
- bundle -v | ||
script: | ||
- 'bundle exec rake $CHECK' | ||
matrix: | ||
fast_finish: true | ||
include: | ||
- rvm: 2.4.0 | ||
env: PUPPET_VERSION="~> 4.0" CHECK=lint | ||
- rvm: 2.4.0 | ||
env: PUPPET_VERSION="~> 4.0" CHECK=spec | ||
- rvm: 2.4.0 | ||
env: PUPPET_VERSION="~> 4.0" CHECK=build DEPLOY_TO_FORGE=yes | ||
branches: | ||
only: | ||
- master | ||
- /^v\d/ | ||
notifications: | ||
email: false | ||
deploy: | ||
provider: puppetforge | ||
user: mvisonneau | ||
password: | ||
secure: "G9TITzYhtWVDFp3FcXT+QmJlpLZWo8a9xsjFErrRnLEXC2hnTyyKjvnmI1oH+UOjOipWx3lPnou+kV31JD7V7mkBZCw+lXT4G/8zS56a7hgzUwaicMWzgHmtU/KmCSLwROE0g7jE25fmouw08fH9WnZa01ROrD6yz+s9qwW8BaYsaOjp7XuNgAUInL8KY5eHkVT4uYdOVsUYJRFh13qO+hqm4Z0zplDV/5mEqxJyDl0XGJXhKoSE8qPlZlR69oskN50JlnXC1nAsbP72YU5BiV8vLGOhURPPPrMT13PCh3OXKXKH0ncC7tQumJ8i+Q8nVoQ6KR3o9nmct/V4+yRgP7oNxPKATI0KW7DyMcKLpO8yVLC0qd2HKKG48y8E+SaUZu10HH8yX/9YpCMKZ8TlJlCNJKeHgc9zH9Z4yhRDijXYXLfalNChaThNanF3aRefQNkPbfGChEewiegp/4J9VIGwfyKrHla1msMJ9c41wTrzKAZbmhmPs5Tom/eVeLQGPqJwMd0SACh4jDy3k8yiiuCDm1MLmm/WpI+jp6CP98is4SsJIR7vf1g2vNcVXMJzioMRTa99rlw2LDadMim051PbaLUDECM8WlNZr7NiS38SWV6YZSbAmoheT5TWgmtzWeZr/DzIC1nc0S/VSiUCOEQWx8TlcABD7h4/kNa3nSs=" | ||
on: | ||
tags: true | ||
all_branches: true | ||
condition: "$DEPLOY_TO_FORGE = 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,12 @@ | ||
source 'https://rubygems.org' | ||
|
||
gem 'facter' | ||
gem 'hiera' | ||
gem 'puppet-blacksmith' | ||
gem 'puppet-lint' | ||
gem 'puppet' | ||
gem 'puppetlabs_spec_helper' | ||
gem 'rake' | ||
gem 'rspec-puppet-facts' | ||
gem 'rspec-puppet' | ||
gem 'rspec' |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
require 'puppet_blacksmith/rake_tasks' | ||
require 'puppet-lint/tasks/puppet-lint' | ||
require 'puppetlabs_spec_helper/rake_tasks' | ||
|
||
## PUPPETLINT CONFIGURATION | ||
Rake::Task[:lint].clear | ||
PuppetLint::RakeTask.new :lint do |config| | ||
config.disable_checks = [ | ||
'140chars' | ||
] | ||
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
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
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
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 |
---|---|---|
@@ -0,0 +1,86 @@ | ||
require 'spec_helper' | ||
|
||
describe 'curator' do | ||
|
||
context 'with default configuration on Debian' do | ||
let :facts do { | ||
:lsbdistid => 'Debian', | ||
:osfamily => 'Debian', | ||
:os => { :family => 'Debian' }, | ||
:puppetversion => '4.8.2' | ||
} | ||
end | ||
|
||
it { should compile.with_all_deps } | ||
it { should contain_class( 'curator::install' ) } | ||
it { should contain_class( 'curator::config' ) } | ||
it { should contain_class( 'curator::repository' ) } | ||
it { should contain_class( 'curator::repository::apt' ) } | ||
it { should_not contain_class( 'curator::repository::yum' ) } | ||
end | ||
|
||
context 'with manage_repository=false on Debian' do | ||
let :params do { | ||
:manage_repository => false, | ||
} | ||
end | ||
|
||
let :facts do { | ||
:lsbdistid => 'Debian', | ||
:osfamily => 'Debian', | ||
:os => { :family => 'Debian' }, | ||
:puppetversion => '4.8.2' | ||
} | ||
end | ||
|
||
it { should compile.with_all_deps } | ||
it { should contain_class( 'curator::install' ) } | ||
it { should contain_class( 'curator::config' ) } | ||
it { should_not contain_class( 'curator::repository' ) } | ||
it { should_not contain_class( 'curator::repository::apt' ) } | ||
it { should_not contain_class( 'curator::repository::yum' ) } | ||
end | ||
|
||
context 'with default configuration on RedHat' do | ||
let :facts do { | ||
:os => { | ||
:family => 'RedHat', | ||
:release => { | ||
:major => '7' | ||
} | ||
} | ||
} | ||
end | ||
|
||
it { should compile.with_all_deps } | ||
it { should contain_class( 'curator::install' ) } | ||
it { should contain_class( 'curator::config' ) } | ||
it { should contain_class( 'curator::repository' ) } | ||
it { should_not contain_class( 'curator::repository::apt' ) } | ||
it { should contain_class( 'curator::repository::yum' ) } | ||
end | ||
|
||
context 'with manage_repository=false on RedHat' do | ||
let :params do { | ||
:manage_repository => false, | ||
} | ||
end | ||
|
||
let :facts do { | ||
:os => { | ||
:family => 'RedHat', | ||
:release => { | ||
:major => '7' | ||
} | ||
} | ||
} | ||
end | ||
|
||
it { should compile.with_all_deps } | ||
it { should contain_class( 'curator::install' ) } | ||
it { should contain_class( 'curator::config' ) } | ||
it { should_not contain_class( 'curator::repository' ) } | ||
it { should_not contain_class( 'curator::repository::apt' ) } | ||
it { should_not contain_class( 'curator::repository::yum' ) } | ||
end | ||
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 @@ | ||
require 'puppetlabs_spec_helper/module_spec_helper' |