Skip to content

Commit

Permalink
Merge pull request #331 from brianbianco/add_fedora_to_kitchen
Browse files Browse the repository at this point in the history
Add fedora-25 to kitchen testing and clean up kitchen config
  • Loading branch information
shortdudey123 authored Apr 27, 2017
2 parents 0d8c6ff + 499e478 commit 82f93d2
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 18 deletions.
28 changes: 13 additions & 15 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ driver_config:

provisioner:
name: chef_solo
# log_level: debug

platforms:
<%
Expand All @@ -17,17 +18,14 @@ platforms:
# non RHEL OS's
test_platforms = %w(
ubuntu-14.04
ubuntu-16.04
centos-6.9
centos-7.3
debian-7.11
debian-8.7
fedora-25
freebsd-10.3
)
# RHEL OS's
test_platforms_rhel = %w(
centos-6.9
centos-7.3
ubuntu-14.04
ubuntu-16.04
)
%>

Expand All @@ -36,16 +34,16 @@ platforms:
driver_config:
box: bento/<%= platform_version %>
require_chef_omnibus: <%= chef_version %>
<% end %>

<% test_platforms_rhel.product(chef_versions).each do |platform_version, chef_version| %>
- name: <%= platform_version %>-<%= chef_version %>
driver_config:
box: bento/<%= platform_version %>
require_chef_omnibus: <%= chef_version %>
<% if platform_version == 'debian-7.11' %>
# Set due to https://github.com/test-kitchen/kitchen-vagrant/issues/293
driver:
kitchen_cache_directory: .kitchen/cache/debian
<% end %>
<% if platform_version.start_with?('centos') %>
run_list:
- recipe[yum-epel::default]
- recipe[yum-remi::default]
<% end %>
<% end %>

suites:
Expand Down
3 changes: 2 additions & 1 deletion test/integration/helpers/serverspec/redisio_examples.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
it 'enables the redis service' do
service_name = if (os[:family] == 'redhat' && os[:release][0] == '7') ||
(os[:family] == 'ubuntu' && os[:release].to_f >= 16.04) ||
(os[:family] == 'debian' && os[:release].to_f >= 8.0)
(os[:family] == 'debian' && os[:release].to_f >= 8.0) ||
os[:family] == 'fedora'
"redis@#{redis_port}"
else
"redis#{redis_port}"
Expand Down
3 changes: 2 additions & 1 deletion test/integration/helpers/serverspec/sentinel_examples.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
redis_cluster_name ||= 'mycluster'
name = if (os[:family] == 'redhat' && os[:release][0] == '7') ||
(os[:family] == 'ubuntu' && os[:release].to_f >= 16.04) ||
(os[:family] == 'debian' && os[:release].to_f >= 8.0)
(os[:family] == 'debian' && os[:release].to_f >= 8.0) ||
os[:family] == 'fedora'
"redis-sentinel@#{redis_cluster_name}"
else
"redis_sentinel_#{redis_cluster_name}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
unless (os[:family] == 'redhat' && os[:release][0] == '7') ||
os[:family] == 'freebsd' ||
(os[:family] == 'ubuntu' && os[:release].to_f >= 16.04) ||
(os[:family] == 'debian' && os[:release].to_f >= 8.0)
(os[:family] == 'debian' && os[:release].to_f >= 8.0) ||
os[:family] == 'fedora'
describe file('/etc/init.d/redis_sentinel_cluster') do
[
%r{SENTINELNAME=sentinel_cluster},
Expand Down

0 comments on commit 82f93d2

Please sign in to comment.