-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for setting redis_service_name
- Loading branch information
1 parent
84c32d9
commit 6a8adca
Showing
6 changed files
with
50 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,3 +24,4 @@ suites: | |
- name: logfile | ||
- name: sentinel | ||
- name: checksum | ||
- name: service-name |
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,5 @@ | ||
--- | ||
- hosts: localhost | ||
roles: | ||
- role: ansible-redis | ||
redis_service_name: redis |
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,29 @@ | ||
require 'spec_helper' | ||
|
||
describe 'Redis' do | ||
describe service('redis') do | ||
it { should be_enabled } | ||
it { should be_running } | ||
end | ||
|
||
describe port(6379) do | ||
it { should be_listening.on('0.0.0.0').with('tcp') } | ||
end | ||
|
||
describe file('/etc/redis/6379.conf') do | ||
it { should be_file } | ||
it { should be_owned_by 'redis' } | ||
its(:content) { should match /port 6379/ } | ||
end | ||
|
||
describe file('/var/run/redis/6379.pid') do | ||
it { should be_file } | ||
it { should be_owned_by 'redis' } | ||
its(:size) { should > 0 } | ||
end | ||
|
||
describe file('/proc/sys/vm/overcommit_memory') do | ||
it { should be_file } | ||
it { should contain '1' } | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
require 'serverspec' | ||
set :backend, :exec |