-
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.
Move back to ServerSpec due to inspec/kitchen-inspec#97 and inspec/in…
- Loading branch information
Showing
3 changed files
with
60 additions
and
57 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 |
---|---|---|
|
@@ -10,9 +10,6 @@ provisioner: | |
platforms: | ||
- name: centos-7.2 | ||
|
||
verifier: | ||
name: inspec | ||
|
||
suites: | ||
- name: default | ||
run_list: | ||
|
54 changes: 0 additions & 54 deletions
54
test/integration/override_properties/inspec/default_spec.rb
This file was deleted.
Oops, something went wrong.
60 changes: 60 additions & 0 deletions
60
test/integration/override_properties/serverspec/default_spec.rb
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,60 @@ | ||
require 'spec_helper' | ||
|
||
describe 'opengrok overridden properties' do | ||
|
||
describe command('printenv JAVA_HOME') do | ||
its(:exit_status) { should eq 0 } | ||
end | ||
|
||
describe user('custom_user') do | ||
it { should exist } | ||
end | ||
|
||
describe group('custom_group') do | ||
it { should exist } | ||
end | ||
|
||
describe file('/opt/tomcat_opengrok/LICENSE') do | ||
it { should be_file } | ||
it { should be_owned_by 'custom_user' } | ||
it { should be_grouped_into 'custom_group' } | ||
end | ||
|
||
describe service('tomcat_opengrok') do | ||
it { should be_enabled } | ||
it { should be_running } | ||
end | ||
|
||
describe file('/opt/custom/opengrok/bin/OpenGrok') do | ||
it { should be_file } | ||
it { should be_owned_by 'custom_user' } | ||
it { should be_grouped_into 'custom_group' } | ||
end | ||
|
||
describe file('/opt/tomcat_opengrok/webapps/source.war') do | ||
it { should be_file } | ||
it { should be_owned_by 'custom_user' } | ||
end | ||
|
||
describe command('curl http://localhost:8080/source/') do | ||
its(:stdout) { should match %r(<title>Search</title>) } | ||
end | ||
|
||
%w(src data etc log).each do |dir| | ||
describe file("/var/custom/opengrok/#{dir}") do | ||
it { should be_directory } | ||
it { should be_owned_by 'custom_user' } | ||
end | ||
end | ||
|
||
describe file('/var/custom/opengrok/etc/configuration.xml') do | ||
it { should be_file } | ||
it { should be_owned_by 'custom_user' } | ||
end | ||
|
||
describe file('/var/custom/opengrok/logging.properties') do | ||
it { should be_file } | ||
it { should be_owned_by 'custom_user' } | ||
end | ||
|
||
end |