Skip to content

Commit

Permalink
Move back to ServerSpec due to inspec/kitchen-inspec#97 and inspec/in…
Browse files Browse the repository at this point in the history
  • Loading branch information
ceilfors committed Aug 20, 2016
1 parent d941b83 commit 1b99ab9
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 57 deletions.
3 changes: 0 additions & 3 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ provisioner:
platforms:
- name: centos-7.2

verifier:
name: inspec

suites:
- name: default
run_list:
Expand Down
54 changes: 0 additions & 54 deletions test/integration/override_properties/inspec/default_spec.rb

This file was deleted.

60 changes: 60 additions & 0 deletions test/integration/override_properties/serverspec/default_spec.rb
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

0 comments on commit 1b99ab9

Please sign in to comment.