Skip to content

Commit 745dd45

Browse files
author
Darrin Eden
committed
Merge pull request sous-chefs#133 from hw-cookbooks/feature/test-kitchen-refresh
Freshen testing
2 parents f976496 + 6c3dea9 commit 745dd45

File tree

7 files changed

+30
-32
lines changed

7 files changed

+30
-32
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ Gemfile.lock
1212
.kitchen
1313
bin
1414
.kitchen.local.yml
15+
.kitchen/

.kitchen.yml

+8-25
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,22 @@
11
---
22
driver_plugin: vagrant
3-
driver_config:
4-
require_chef_omnibus: true
53

64
platforms:
75
- name: ubuntu-12.04
8-
driver_config:
9-
box: opscode-ubuntu-12.04
10-
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_provisionerless.box
116
run_list:
127
- recipe[apt]
138

149
- name: ubuntu-10.04
15-
driver_config:
16-
box: opscode-ubuntu-10.04
17-
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-10.04_provisionerless.box
1810
run_list:
1911
- recipe[apt]
2012

21-
- name: debian-7.1.0
22-
driver_config:
23-
box: opscode-debian-7.1.0
24-
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_debian-7.1.0_provisionerless.box
13+
- name: debian-7.4
2514
run_list:
2615
- recipe[apt]
2716

2817
- name: centos-6.4
29-
driver_config:
30-
box: opscode-centos-6.4
31-
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_centos-6.4_provisionerless.box
3218

33-
- name: centos-5.9
34-
driver_config:
35-
box: opscode-centos-5.9
36-
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_centos-5.9_provisionerless.box
19+
- name: centos-5.10
3720

3821
suites:
3922
- name: default
@@ -54,7 +37,7 @@ suites:
5437
run_list:
5538
- recipe[minitest-handler]
5639
- recipe[postgresql]
57-
excludes: ["centos-5.9", "centos-6.4"]
40+
excludes: ["centos-5.10", "centos-6.4"]
5841
attributes:
5942
postgresql:
6043
enable_pgdg_apt: true
@@ -64,7 +47,7 @@ suites:
6447
run_list:
6548
- recipe[minitest-handler]
6649
- recipe[postgresql]
67-
excludes: ["ubuntu-10.04", "ubuntu-12.04", "debian-7.1.0"]
50+
excludes: ["ubuntu-10.04", "ubuntu-12.04", "debian-7.4"]
6851
attributes:
6952
postgresql:
7053
enable_pgdg_yum: true
@@ -93,7 +76,7 @@ suites:
9376
- recipe[minitest-handler]
9477
- recipe[postgresql::ruby]
9578
- recipe[postgresql::server]
96-
excludes: ["centos-5.9", "centos-6.4"]
79+
excludes: ["centos-5.10", "centos-6.4"]
9780
attributes:
9881
postgresql:
9982
enable_pgdg_apt: true
@@ -109,7 +92,7 @@ suites:
10992
- recipe[minitest-handler]
11093
- recipe[postgresql::ruby]
11194
- recipe[postgresql::server]
112-
excludes: ["ubuntu-10.04", "ubuntu-12.04", "debian-7.1.0"]
95+
excludes: ["ubuntu-10.04", "ubuntu-12.04", "debian-7.4"]
11396
attributes:
11497
postgresql:
11598
enable_pgdg_yum: true
@@ -125,7 +108,7 @@ suites:
125108
- recipe[minitest-handler]
126109
- recipe[postgresql]
127110
- recipe[postgresql::ruby]
128-
excludes: ["centos-5.9", "centos-6.4"]
111+
excludes: ["centos-5.10", "centos-6.4"]
129112
attributes:
130113
postgresql:
131114
enable_pgdg_apt: true
@@ -136,7 +119,7 @@ suites:
136119
- recipe[minitest-handler]
137120
- recipe[postgresql]
138121
- recipe[postgresql::ruby]
139-
excludes: ["ubuntu-10.04", "ubuntu-12.04", "debian-7.1.0"]
122+
excludes: ["ubuntu-10.04", "ubuntu-12.04", "debian-7.4"]
140123
attributes:
141124
postgresql:
142125
enable_pgdg_yum: true

Berksfile

+1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ site :opscode
33
metadata
44

55
group :integration do
6+
cookbook 'build-essential', github: 'opscode-cookbooks/build-essential'
67
cookbook 'minitest-handler'
78
end

Gemfile

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
source 'https://rubygems.org'
2+
3+
gem 'test-kitchen'
4+
gem 'kitchen-vagrant'
5+
gem 'berkshelf'

attributes/default.rb

+3-2
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,11 @@
171171
default['postgresql']['config']['datestyle'] = 'iso, mdy'
172172
default['postgresql']['config']['default_text_search_config'] = 'pg_catalog.english'
173173
default['postgresql']['config']['ssl'] = true
174-
default['postgresql']['config']['ssl_cert_file'] = '/etc/ssl/certs/ssl-cert-snakeoil.pem'
175-
default['postgresql']['config']['ssl_key_file'] = '/etc/ssl/private/ssl-cert-snakeoil.key'
174+
default['postgresql']['config']['ssl_cert_file'] = '/etc/ssl/certs/ssl-cert-snakeoil.pem' if node['postgresql']['version'].to_f >= 9.2
175+
default['postgresql']['config']['ssl_key_file'] = '/etc/ssl/private/ssl-cert-snakeoil.key'if node['postgresql']['version'].to_f >= 9.2
176176
when 'rhel', 'fedora', 'suse'
177177
default['postgresql']['config']['listen_addresses'] = 'localhost'
178+
default['postgresql']['config']['port'] = 5432
178179
default['postgresql']['config']['max_connections'] = 100
179180
default['postgresql']['config']['shared_buffers'] = '32MB'
180181
default['postgresql']['config']['logging_collector'] = true

recipes/client.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
# limitations under the License.
2020
#
2121

22-
if node['postgresql']['version'].to_f > 9.1 && platform_family?('ubuntu', 'debian')
23-
node.default['postgresql']['enable_pgdg_apt'] = true
22+
if platform_family?('ubuntu', 'debian') && node['postgresql']['version'].to_f > 9.1
23+
node.default['postgresql']['enable_pgdg_apt'] = true
2424
end
2525

2626
if(node['postgresql']['enable_pgdg_apt'])

recipes/ruby.rb

+10-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,14 @@
2525
require 'pg'
2626
rescue LoadError
2727

28-
node.set['build_essential']['compiletime'] = true
28+
if platform_family?('ubuntu', 'debian')
29+
e = execute 'apt-get update' do
30+
action :nothing
31+
end
32+
e.run_action(:run) unless ::File.exists?('/var/lib/apt/periodic/update-success-stamp')
33+
end
34+
35+
node.set['build-essential']['compile_time'] = true
2936
include_recipe "build-essential"
3037
include_recipe "postgresql::client"
3138

@@ -47,9 +54,9 @@
4754
resources("package[#{pg_pack}]").run_action(:install)
4855
end
4956

50-
if ["debian","ubuntu"].include? node['platform']
57+
if ["debian","ubuntu"].include? node['platform']
5158
package "libpq-dev" do
52-
action :nothing
59+
action :nothing
5360
end.run_action(:install)
5461
end
5562

0 commit comments

Comments
 (0)