Skip to content

Commit 327327f

Browse files
authored
Merge pull request puppetlabs#1028 from puppetlabs/pdksync_FM-7392_pdk_update
pdksync - (FM-7392) - Puppet 6 Testing Changes
2 parents df04f26 + bda50ef commit 327327f

File tree

7 files changed

+29
-24
lines changed

7 files changed

+29
-24
lines changed

.fixtures.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,11 @@ fixtures:
44
stdlib: "https://github.com/puppetlabs/puppetlabs-stdlib.git"
55
firewall: "https://github.com/puppetlabs/puppetlabs-firewall.git"
66
concat: "https://github.com/puppetlabs/puppetlabs-concat.git"
7+
yumrepo_core:
8+
repo: "https://github.com/puppetlabs/puppetlabs-yumrepo_core.git"
9+
puppet_version: ">= 6.0.0"
10+
augeas_core:
11+
repo: "https://github.com/puppetlabs/puppetlabs-augeas_core.git"
12+
puppet_version: ">= 6.0.0"
713
symlinks:
814
postgresql: "#{source_dir}"

.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: 7 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

@@ -41,7 +34,6 @@ group :system_tests do
4134
end
4235

4336
puppet_version = ENV['PUPPET_GEM_VERSION']
44-
puppet_type = gem_type(puppet_version)
4537
facter_version = ENV['FACTER_GEM_VERSION']
4638
hiera_version = ENV['HIERA_GEM_VERSION']
4739

manifests/server/grant.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
define postgresql::server::grant (
33
String $role,
44
String $db,
5-
Optional[String] $privilege = undef,
5+
String $privilege = '',
66
Pattern[#/(?i:^COLUMN$)/,
77
/(?i:^ALL SEQUENCES IN SCHEMA$)/,
88
/(?i:^ALL TABLES IN SCHEMA$)/,

metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,5 @@
8484
],
8585
"pdk-version": "1.7.0",
8686
"template-url": "https://github.com/puppetlabs/pdk-templates",
87-
"template-ref": "1.7.0-0-g57412ed"
87+
"template-ref": "heads/master-0-g8fc95db"
8888
}

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)