Skip to content

Commit e69d1ce

Browse files
authored
Merge pull request puppetlabs#55 from puppetlabs/pdksync_FM-7392_pdk_update
pdksync - (FM-7392) - Puppet 6 Testing Changes
2 parents e5fc832 + 64a1700 commit e69d1ce

File tree

6 files changed

+31
-23
lines changed

6 files changed

+31
-23
lines changed

.rubocop.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ AllCops:
1919
Metrics/LineLength:
2020
Description: People have wide screens, use them.
2121
Max: 200
22+
GetText/DecorateString:
23+
Description: We don't want to decorate test output.
24+
Exclude:
25+
- spec/*
2226
RSpec/BeforeAfterAll:
2327
Description: Beware of using after(:all) as it may cause state to leak between tests.
2428
A necessary evil in acceptance testing.

.travis.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,36 @@ script:
1313
- 'bundle exec rake $CHECK'
1414
bundler_args: --without system_tests
1515
rvm:
16-
- 2.4.4
16+
- 2.5.0
1717
env:
1818
global:
19-
- BEAKER_PUPPET_COLLECTION=puppet5 PUPPET_GEM_VERSION="~> 5.0"
19+
- BEAKER_PUPPET_COLLECTION=puppet6 PUPPET_GEM_VERSION="~> 6.0"
2020
matrix:
2121
fast_finish: true
2222
include:
2323
-
2424
bundler_args:
2525
dist: trusty
26-
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_set=docker/centos-7 BEAKER_TESTMODE=apply
27-
rvm: 2.4.4
26+
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_set=docker/centos-7 BEAKER_TESTMODE=apply
27+
rvm: 2.5.0
2828
script: bundle exec rake beaker
2929
services: docker
3030
sudo: required
3131
-
3232
bundler_args:
3333
dist: trusty
34-
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_set=docker/ubuntu-14.04 BEAKER_TESTMODE=apply
35-
rvm: 2.4.4
34+
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_set=docker/ubuntu-14.04 BEAKER_TESTMODE=apply
35+
rvm: 2.5.0
3636
script: bundle exec rake beaker
3737
services: docker
3838
sudo: required
3939
-
4040
env: CHECK="syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop"
4141
-
4242
env: CHECK=parallel_spec
43+
-
44+
env: PUPPET_GEM_VERSION="~> 5.0" CHECK=parallel_spec
45+
rvm: 2.4.4
4346
-
4447
env: PUPPET_GEM_VERSION="~> 4.0" CHECK=parallel_spec
4548
rvm: 2.1.9

Gemfile

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
11
source ENV['GEM_SOURCE'] || 'https://rubygems.org'
22

33
def location_for(place_or_version, fake_version = nil)
4-
if place_or_version =~ %r{\A(git[:@][^#]*)#(.*)}
5-
[fake_version, { git: Regexp.last_match(1), branch: Regexp.last_match(2), require: false }].compact
6-
elsif place_or_version =~ %r{\Afile:\/\/(.*)}
7-
['>= 0', { path: File.expand_path(Regexp.last_match(1)), require: false }]
8-
else
9-
[place_or_version, { require: false }]
10-
end
11-
end
4+
git_url_regex = %r{\A(?<url>(https?|git)[:@][^#]*)(#(?<branch>.*))?}
5+
file_url_regex = %r{\Afile:\/\/(?<path>.*)}
126

13-
def gem_type(place_or_version)
14-
if place_or_version =~ %r{\Agit[:@]}
15-
:git
16-
elsif !place_or_version.nil? && place_or_version.start_with?('file:')
17-
:file
7+
if place_or_version && (git_url = place_or_version.match(git_url_regex))
8+
[fake_version, { git: git_url[:url], branch: git_url[:branch], require: false }].compact
9+
elsif place_or_version && (file_url = place_or_version.match(file_url_regex))
10+
['>= 0', { path: File.expand_path(file_url[:path]), require: false }]
1811
else
19-
:gem
12+
[place_or_version, { require: false }]
2013
end
2114
end
2215

@@ -33,14 +26,14 @@ group :development do
3326
gem "puppet-module-posix-dev-r#{minor_version}", require: false, platforms: [:ruby]
3427
gem "puppet-module-win-default-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
3528
gem "puppet-module-win-dev-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
29+
gem "github_changelog_generator", require: false, git: 'https://github.com/skywinder/github-changelog-generator', ref: '20ee04ba1234e9e83eb2ffb5056e23d641c7a018' if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2')
3630
end
3731
group :system_tests do
3832
gem "puppet-module-posix-system-r#{minor_version}", require: false, platforms: [:ruby]
3933
gem "puppet-module-win-system-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
4034
end
4135

4236
puppet_version = ENV['PUPPET_GEM_VERSION']
43-
puppet_type = gem_type(puppet_version)
4437
facter_version = ENV['FACTER_GEM_VERSION']
4538
hiera_version = ENV['HIERA_GEM_VERSION']
4639

appveyor.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ environment:
3030
PUPPET_GEM_VERSION: ~> 5.0
3131
RUBY_VERSION: 24-x64
3232
CHECK: parallel_spec
33+
-
34+
PUPPET_GEM_VERSION: ~> 6.0
35+
RUBY_VERSION: 25
36+
CHECK: parallel_spec
37+
-
38+
PUPPET_GEM_VERSION: ~> 6.0
39+
RUBY_VERSION: 25-x64
40+
CHECK: parallel_spec
3341
matrix:
3442
fast_finish: true
3543
install:

metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,5 @@
4545
"description": "Tasks that manipulate a service",
4646
"pdk-version": "1.7.0",
4747
"template-url": "https://github.com/puppetlabs/pdk-templates",
48-
"template-ref": "1.7.0-0-g57412ed"
48+
"template-ref": "heads/master-0-g8fc95db"
4949
}

spec/default_facts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# Facts specified here will override the values provided by rspec-puppet-facts.
44
---
5-
concat_basedir: "/tmp"
5+
concat_basedir: ""
66
ipaddress: "172.16.254.254"
77
is_pe: false
88
macaddress: "AA:AA:AA:AA:AA:AA"

0 commit comments

Comments
 (0)