Test

Our actual test itself is one of the simplest files in our new iteration. We're placing it in the default folder, so it's found by the default suite we mentioned previously. We're building a single control or set of tests, with three tests:

  • Ensure that the Jenkins package is installed
  • Ensure that the Jenkins service is running
  • Ensure that Jenkins can be reached on the localhost at 8080, and returns a 200 exit status:
# profile/integration/default/jenkins_spec.rb
control 'Jenkins Status' do
describe package('jenkins') do
it { is_expected.to be_installed }
end

describe http('http://localhost:8080', open_timeout: 60, read_timeout: 60) do
its('status') { is_expected.to cmp 200 }
end

describe service('jenkins') do
it { is_expected.to be_running }
end
end
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.151.220