forked from voxpupuli/puppet-redis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds tests for Ubuntu 1404 and Trusty package
* We say we support 1404, but aren't testing * But 1404 has an older package, and certain config settings aren't present (See voxpupuli#111) * Add 2.8.X config file and logic to fix that * Add to CI, add docker and vagrant SUTs
- Loading branch information
Showing
8 changed files
with
955 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
HOSTS: | ||
ubuntu-14-04: | ||
roles: | ||
- master | ||
platform: ubuntu-14.04-amd64 | ||
image: electrical/ubuntu:14.04 | ||
hypervisor: docker | ||
docker_cmd: '["/sbin/init"]' | ||
docker_image_commands: | ||
- 'apt-get update' | ||
- 'apt-get install -yq lsb-release wget net-tools curl' | ||
docker_preserve_image: true | ||
CONFIG: | ||
type: foss | ||
log_level: debug | ||
:trace_limit: 100 # Get more than 10 lines of trace when something fails. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
HOSTS: | ||
ubuntu-14-04: | ||
roles: | ||
- default | ||
- master | ||
platform: ubuntu-14.04-amd64 | ||
box: bento/ubuntu-14.04 | ||
hypervisor: vagrant | ||
CONFIG: | ||
type: foss | ||
log_level: debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
require 'spec_helper' | ||
|
||
describe 'redis' do | ||
context 'on Ubuntu 1404' do | ||
|
||
let(:facts) { | ||
ubuntu_1404_facts | ||
} | ||
|
||
context 'should set Ubuntu specific values' do | ||
|
||
context 'when $::redis_server_version fact is not present (older features not enabled)' do | ||
|
||
let(:facts) { | ||
ubuntu_1404_facts.merge({ | ||
:redis_server_version => nil, | ||
}) | ||
} | ||
|
||
it { should contain_file('/etc/redis/redis.conf.puppet').with('content' => /^hash-max-ziplist-entries/) } | ||
it { should contain_file('/etc/redis/redis.conf.puppet').without('content' => /^tcp-backlog/) } | ||
|
||
end | ||
|
||
context 'when $::redis_server_version fact is present but the older version (older features not enabled)' do | ||
|
||
let(:facts) { | ||
ubuntu_1404_facts.merge({ | ||
:redis_server_version => '2.8.5', | ||
}) | ||
} | ||
|
||
it { should contain_file('/etc/redis/redis.conf.puppet').with('content' => /^hash-max-ziplist-entries/) } | ||
it { should contain_file('/etc/redis/redis.conf.puppet').without('content' => /^tcp-backlog/) } | ||
|
||
end | ||
|
||
context 'when $::redis_server_version fact is present but a newer version (older features enabled)' do | ||
|
||
let(:facts) { | ||
ubuntu_1404_facts.merge({ | ||
:redis_server_version => '3.2.1', | ||
}) | ||
} | ||
|
||
it { should contain_file('/etc/redis/redis.conf.puppet').with('content' => /^hash-max-ziplist-entries/) } | ||
it { should contain_file('/etc/redis/redis.conf.puppet').with('content' => /^tcp-backlog/) } | ||
|
||
end | ||
end | ||
|
||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.