Add idempotency test
Add a test to ensure the module is idempotent. By doing this extra work, the ethercalc service has enough time to figure things out and get started, so we can also enable the checks to ensure the service is responding. Change-Id: Iede6db9dda0814bee9072c6dcc554ccc1aa89af1
This commit is contained in:
parent
23a6360c25
commit
bc771d07c8
@ -15,6 +15,10 @@ describe 'puppet-ethercalc:: manifest', :if => ['debian', 'ubuntu'].include?(os[
|
|||||||
apply_manifest(init_puppet_module, catch_failures: true)
|
apply_manifest(init_puppet_module, catch_failures: true)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'should be idempotent' do
|
||||||
|
apply_manifest(init_puppet_module, catch_changes: true)
|
||||||
|
end
|
||||||
|
|
||||||
describe 'required packages' do
|
describe 'required packages' do
|
||||||
describe 'os packages' do
|
describe 'os packages' do
|
||||||
required_packages = [
|
required_packages = [
|
||||||
@ -36,19 +40,16 @@ describe 'puppet-ethercalc:: manifest', :if => ['debian', 'ubuntu'].include?(os[
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# TODO(ianw): not quite reliable ... possibly need this in a retry
|
describe 'required services' do
|
||||||
# loop for a little to let the service start up?
|
describe 'ports are open and services are reachable' do
|
||||||
|
describe port(8000) do
|
||||||
|
it { should be_listening }
|
||||||
|
end
|
||||||
|
|
||||||
# describe 'required services' do
|
describe command('curl http://localhost:8000 --verbose') do
|
||||||
# describe 'ports are open and services are reachable' do
|
its(:stdout) { should contain('EtherCalc - Share the URL to your friends') }
|
||||||
# describe port(8000) do
|
end
|
||||||
# it { should be_listening }
|
end
|
||||||
# end
|
end
|
||||||
|
|
||||||
# describe command('curl http://localhost:8000 --verbose') do
|
|
||||||
# its(:stdout) { should contain('EtherCalc - Share the URL to your friends') }
|
|
||||||
# end
|
|
||||||
# end
|
|
||||||
# end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user