Skip to content

Commit 6e6d242

Browse files
committed
(FM-4049) Update to current msync configs [2c99161]
1 parent 6120869 commit 6e6d242

9 files changed

+45
-59
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ spec/fixtures/
55
.vagrant/
66
.bundle/
77
coverage/
8+
log/
89
.idea/
910
*.iml

.rspec

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
--color
2+
--format documentation

.sync.yml

-9
This file was deleted.

.travis.yml

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
---
22
sudo: false
33
language: ruby
4+
cache: bundler
45
bundler_args: --without system_tests
5-
script: "bundle exec rake validate && bundle exec rake lint && bundle exec rake spec SPEC_OPTS='--format documentation'"
6+
script: "bundle exec rake validate lint spec"
67
matrix:
78
fast_finish: true
89
include:
9-
- rvm: 1.9.3
10-
env: PUPPET_GEM_VERSION="~> 3.0"
11-
- rvm: 2.1.5
12-
env: PUPPET_GEM_VERSION="~> 3.0"
13-
- rvm: 2.1.5
14-
env: PUPPET_GEM_VERSION="~> 3.0" FUTURE_PARSER="yes"
1510
- rvm: 2.1.6
1611
env: PUPPET_GEM_VERSION="~> 4.0" STRICT_VARIABLES="yes"
12+
- rvm: 2.1.5
13+
env: PUPPET_GEM_VERSION="~> 3.0" FUTURE_PARSER="yes"
14+
- rvm: 2.1.5
15+
env: PUPPET_GEM_VERSION="~> 3.0"
16+
- rvm: 1.9.3
17+
env: PUPPET_GEM_VERSION="~> 3.0"
1718
notifications:
1819
email: false

CONTRIBUTING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ If you already have those gems installed, make sure they are up-to-date:
159159
With all dependencies in place and up-to-date we can now run the tests:
160160

161161
```shell
162-
% rake spec
162+
% bundle exec rake spec
163163
```
164164

165165
This will execute all the [rspec tests](http://rspec-puppet.com/) tests
@@ -178,8 +178,8 @@ installed on your system.
178178
You can run them by issuing the following command
179179

180180
```shell
181-
% rake spec_clean
182-
% rspec spec/acceptance
181+
% bundle exec rake spec_clean
182+
% bundle exec rspec spec/acceptance
183183
```
184184

185185
This will now download a pre-fabricated image configured in the [default node-set](./spec/acceptance/nodesets/default.yml),

Gemfile

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
source ENV['GEM_SOURCE'] || "https://rubygems.org"
22

33
def location_for(place, fake_version = nil)
4-
if place =~ /^(git:[^#]*)#(.*)/
4+
if place =~ /^(git[:@][^#]*)#(.*)/
55
[fake_version, { :git => $1, :branch => $2, :require => false }].compact
66
elsif place =~ /^file:\/\/(.*)/
77
['>= 0', { :path => File.expand_path($1), :require => false }]
@@ -11,14 +11,16 @@ def location_for(place, fake_version = nil)
1111
end
1212

1313
group :development, :unit_tests do
14-
gem 'rspec-core', '3.1.7', :require => false
15-
gem 'puppetlabs_spec_helper', :require => false
16-
gem 'simplecov', :require => false
17-
gem 'puppet_facts', :require => false
18-
gem 'json', :require => false
14+
gem 'json', :require => false
15+
gem 'metadata-json-lint', :require => false
16+
gem 'puppet_facts', :require => false
17+
gem 'puppet-blacksmith', :require => false
18+
gem 'puppetlabs_spec_helper', :require => false
19+
gem 'rspec-puppet', '>= 2.3.2', :require => false
20+
gem 'simplecov', :require => false
1921
end
20-
2122
group :system_tests do
23+
gem 'beaker-puppet_install_helper', :require => false
2224
if beaker_version = ENV['BEAKER_VERSION']
2325
gem 'beaker', *location_for(beaker_version)
2426
end
@@ -27,12 +29,10 @@ group :system_tests do
2729
else
2830
gem 'beaker-rspec', :require => false
2931
end
30-
gem 'serverspec', :require => false
31-
gem 'beaker-puppet_install_helper', :require => false
32+
gem 'master_manipulator', :require => false
33+
gem 'serverspec', :require => false
3234
end
3335

34-
35-
3636
if facterversion = ENV['FACTER_GEM_VERSION']
3737
gem 'facter', facterversion, :require => false
3838
else

Rakefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
require 'puppetlabs_spec_helper/rake_tasks'
1+
require 'puppet_blacksmith/rake_tasks'
22
require 'puppet-lint/tasks/puppet-lint'
3+
require 'puppetlabs_spec_helper/rake_tasks'
34

45
PuppetLint.configuration.fail_on_warnings = true
56
PuppetLint.configuration.send('relative')

spec/spec_helper.rb

+4-28
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,7 @@
11
require 'puppetlabs_spec_helper/module_spec_helper'
22

3-
RSpec.configure do |c|
4-
c.mock_with :rspec do |mock|
5-
mock.syntax = [:expect, :should]
6-
end
7-
c.include PuppetlabsSpec::Files
8-
9-
c.before :each do
10-
# Store any environment variables away to be restored later
11-
@old_env = {}
12-
ENV.each_key {|k| @old_env[k] = ENV[k]}
13-
14-
if ENV['STRICT_VARIABLES'] == 'yes'
15-
Puppet.settings[:strict_variables]=true
16-
end
17-
end
18-
19-
c.after :each do
20-
PuppetlabsSpec::Files.cleanup
21-
end
3+
# put local configuration and setup into spec_helper_local
4+
begin
5+
require 'spec_helper_local'
6+
rescue LoadError
227
end
23-
24-
# Convenience helper for returning parameters for a type from the
25-
# catalogue.
26-
def param(type, title, param)
27-
param_value(catalogue, type, title, param)
28-
end
29-
30-
# With rspec-puppet v2.0 this allows coverage checks.
31-
#at_exit { RSpec::Puppet::Coverage.report! }

spec/spec_helper_local.rb

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
RSpec.configure do |c|
2+
c.mock_with :rspec
3+
4+
c.include PuppetlabsSpec::Files
5+
c.after :each do
6+
PuppetlabsSpec::Files.cleanup
7+
end
8+
end
9+
10+
# Convenience helper for returning parameters for a type from the
11+
# catalogue.
12+
def param(type, title, param)
13+
param_value(catalogue, type, title, param)
14+
end

0 commit comments

Comments
 (0)