Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #138 from kennonkwok/tests-update-serverspec
test-kitchen updates - porting to serverspec, added cluster suites
- Loading branch information
Showing
8 changed files
with
70 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,4 +34,5 @@ group :development do | |
gem 'guard-rspec' | ||
gem 'guard-rubocop' | ||
gem 'rake' | ||
gem 'stove' | ||
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
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,10 @@ | ||
require 'spec_helper' | ||
|
||
describe file('/var/lib/rabbitmq/.erlang.cookie') do | ||
it { should be_file } | ||
end | ||
|
||
describe file('/etc/rabbitmq/rabbitmq.config') do | ||
it { should be_file } | ||
its(:content) { should match /^ {cluster_nodes, {.*}},$/ } | ||
end |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
require 'spec_helper' |
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,37 @@ | ||
require 'spec_helper' | ||
|
||
describe package('rabbitmq-server') do | ||
it { should be_installed } | ||
end | ||
|
||
describe service('rabbitmq-server') do | ||
it { should be_enabled } | ||
it { should be_running } | ||
end | ||
|
||
describe port(5672) do | ||
it { should be_listening } | ||
end | ||
|
||
describe command('rabbitmqctl status') do | ||
it { should return_exit_status 0 } | ||
end | ||
|
||
describe file('/var/lib/rabbitmq/mnesia') do | ||
it { should be_directory } | ||
it { should be_mode 775 } | ||
it { should be_owned_by 'rabbitmq' } | ||
it { should be_grouped_into 'rabbitmq' } | ||
end | ||
|
||
describe file('/etc/rabbitmq/rabbitmq-env.conf') do | ||
it { should be_file } | ||
it { should be_owned_by 'root' } | ||
it { should be_grouped_into 'root' } | ||
end | ||
|
||
describe file('/etc/rabbitmq/rabbitmq.config') do | ||
it { should be_file } | ||
it { should be_owned_by 'root' } | ||
it { should be_grouped_into 'root' } | ||
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,13 @@ | ||
require 'serverspec' | ||
|
||
include SpecInfra::Helper::Exec | ||
include SpecInfra::Helper::DetectOS | ||
|
||
RSpec.configure do |c| | ||
if ENV['ASK_SUDO_PASSWORD'] | ||
require 'highline/import' | ||
c.sudo_password = ask("Enter sudo password: ") { |q| q.echo = false } | ||
else | ||
c.sudo_password = ENV['SUDO_PASSWORD'] | ||
end | ||
end |