Skip to content

Commit f6c1c85

Browse files
committed
Merge pull request puppetlabs#648 from bmjen/sync-with-master
Sync with master
2 parents ad3e042 + 04d59ee commit f6c1c85

File tree

5 files changed

+23
-28
lines changed

5 files changed

+23
-28
lines changed

.fixtures.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
fixtures:
22
repositories:
3-
apt: "https://github.com/puppetlabs/puppetlabs-apt.git"
3+
apt:
4+
repo: "https://github.com/puppetlabs/puppetlabs-apt.git"
5+
branch: "1.8.x"
46
stdlib: "https://github.com/puppetlabs/puppetlabs-stdlib.git"
57
firewall: "https://github.com/puppetlabs/puppetlabs-firewall.git"
68
concat: "https://github.com/puppetlabs/puppetlabs-concat.git"

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ This release has several new features, bugfixes, and test improvements.
1616
- Fix execution command with puppet <3.4 (MODULES-1923)
1717
- Fix Puppet.newtype deprecation warning (MODULES-2007)
1818
- Fix systemd override for manage_repo package versions
19+
- Fix Copy snakeoil certificate and key instead of symlinking
1920

2021
#### Test Improvements
2122
- Allows setting BEAKER and BEAKER_RSPEC versions via environment variables.
2223
- Enables Unit testing on Travis CI with Puppet 4.
24+
- Cleans up spec_helper_acceptance.rb to use new puppet_install_helper gem.
2325

2426
## 2015-03-24 - Supported Release 4.3.0
2527
### Summary

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ group :system_tests do
2828
gem 'beaker-rspec', :require => false
2929
end
3030
gem 'serverspec', :require => false
31+
gem 'beaker-puppet_install_helper', :require => false
3132
end
3233

3334

manifests/server/initdb.pp

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,19 +83,25 @@
8383
require => File[$require_before_initdb],
8484
}
8585
# The package will take care of this for us the first time, but if we
86-
# ever need to init a new db we need to make these links explicitly
86+
# ever need to init a new db we need to copy these files explicitly
8787
if $::operatingsystem == 'Debian' or $::operatingsystem == 'Ubuntu' {
8888
if $::operatingsystemrelease =~ /^6/ or $::operatingsystemrelease =~ /^7/ or $::operatingsystemrelease =~ /^10\.04/ or $::operatingsystemrelease =~ /^12\.04/ {
8989
file { 'server.crt':
90-
ensure => link,
90+
ensure => file,
9191
path => "${datadir}/server.crt",
92-
target => '/etc/ssl/certs/ssl-cert-snakeoil.pem',
92+
source => 'file:///etc/ssl/certs/ssl-cert-snakeoil.pem',
93+
owner => $::postgresql::server::user,
94+
group => $::postgresql::server::group,
95+
mode => '0644',
9396
require => Exec['postgresql_initdb'],
9497
}
9598
file { 'server.key':
96-
ensure => link,
99+
ensure => file,
97100
path => "${datadir}/server.key",
98-
target => '/etc/ssl/private/ssl-cert-snakeoil.key',
101+
source => 'file:///etc/ssl/private/ssl-cert-snakeoil.key',
102+
owner => $::postgresql::server::user,
103+
group => $::postgresql::server::group,
104+
mode => '0600',
99105
require => Exec['postgresql_initdb'],
100106
}
101107
}

spec/spec_helper_acceptance.rb

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
require 'beaker-rspec/spec_helper'
22
require 'beaker-rspec/helpers/serverspec'
3+
require 'beaker/puppet_install_helper'
4+
5+
run_puppet_install_helper
6+
7+
UNSUPPORTED_PLATFORMS = ['AIX','windows','Solaris','Suse']
38

49
class String
510
# Provide ability to remove indentation from strings, for the purpose of
@@ -34,27 +39,6 @@ def psql(psql_cmd, user = 'postgres', exit_codes = [0,1], &block)
3439
shell("su #{shellescape(user)} -c #{shellescape(psql)}", :acceptable_exit_codes => exit_codes, &block)
3540
end
3641

37-
unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no'
38-
# This will install the latest available package on el and deb based
39-
# systems fail on windows and osx, and install via gem on other *nixes
40-
foss_opts = { :default_action => 'gem_install' }
41-
42-
if default.is_pe?; then install_pe; else install_puppet( foss_opts ); end
43-
44-
hosts.each do |host|
45-
shell("mkdir -p #{host['distmoduledir']}")
46-
if ! host.is_pe?
47-
# Augeas is only used in one place, for Redhat.
48-
if fact('osfamily') == 'RedHat'
49-
install_package host, 'ruby-devel'
50-
#install_package host, 'augeas-devel'
51-
#install_package host, 'ruby-augeas'
52-
end
53-
end
54-
end
55-
end
56-
57-
UNSUPPORTED_PLATFORMS = ['AIX','windows','Solaris','Suse']
5842

5943
RSpec.configure do |c|
6044
# Project root
@@ -92,7 +76,7 @@ def psql(psql_cmd, user = 'postgres', exit_codes = [0,1], &block)
9276
hosts.each do |host|
9377
on host, "/bin/touch #{default['puppetpath']}/hiera.yaml"
9478
on host, 'chmod 755 /root'
95-
if fact('osfamily') == 'Debian'
79+
if fact_on(host, 'osfamily') == 'Debian'
9680
on host, "echo \"en_US ISO-8859-1\nen_NG.UTF-8 UTF-8\nen_US.UTF-8 UTF-8\n\" > /etc/locale.gen"
9781
on host, '/usr/sbin/locale-gen'
9882
on host, '/usr/sbin/update-locale'

0 commit comments

Comments
 (0)