-
-
Notifications
You must be signed in to change notification settings - Fork 244
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 #401 from legal90/tests-inspec
Integration tests: Switch to InSpec, test ACL
- Loading branch information
Showing
18 changed files
with
244 additions
and
299 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
# TODO | ||
- Fix the helpers and clean up the where it injects into DSL. | ||
- Use the InSpec instead of ServerSpec. |
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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
include_recipe 'consul::default' | ||
include_recipe 'consul_spec::consul_definition' | ||
include_recipe 'consul_spec::consul_watch' | ||
include_recipe 'consul_spec::consul_installation_webui' | ||
include_recipe 'consul_spec::consul_acl' unless node.platform_family?('windows') |
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,55 @@ | ||
require_relative '../spec_helper' | ||
|
||
consul_executable = "/opt/consul/#{consul_version}/consul" | ||
config_file = '/etc/consul/consul.json' | ||
config_dir = '/etc/consul' | ||
|
||
describe file(consul_executable) do | ||
it { should be_file } | ||
it { should be_executable } | ||
end | ||
|
||
describe group('consul') do | ||
it { should exist } | ||
end | ||
|
||
describe user('consul') do | ||
it { should exist } | ||
its('group') { should eq 'consul' } | ||
end | ||
|
||
describe command("su - consul -c 'echo successfully logged in'") do | ||
its(:stdout) { should_not match /successfully logged in/ } | ||
its(:exit_status) { should_not eq 0 } | ||
end | ||
|
||
describe service('consul') do | ||
it { should be_enabled } | ||
it { should be_running } | ||
end | ||
|
||
[8400, 8500, 8600].each do |p| | ||
describe port(p) do | ||
it { should be_listening } | ||
end | ||
end | ||
|
||
describe command("#{consul_executable} members -detailed") do | ||
its(:exit_status) { should eq 0 } | ||
its(:stdout) { should match %r{\balive\b} } | ||
its(:stdout) { should match %r{\brole=node\b} } | ||
end | ||
|
||
describe file('/usr/local/bin/consul') do | ||
it { should be_symlink } | ||
end | ||
|
||
describe file(config_file) do | ||
it { should be_file } | ||
its('mode') { should cmp '0640' } | ||
end | ||
|
||
describe file(config_dir) do | ||
it { should be_directory } | ||
its('mode') { should cmp '0755' } | ||
end |
Oops, something went wrong.