summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColleen Murphy <colleen.murphy@suse.de>2018-07-24 13:09:58 +0200
committerColleen Murphy <colleen.murphy@suse.de>2018-08-13 12:01:05 +0200
commitbc771d07c8010d5b7c8ed5ad954bc3467f5a7f78 (patch)
tree7819dcfe52fed9c144dbc237418c849487f5d7b9
parent23a6360c257393cc2a976f50248632165c6d318e (diff)
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
Notes
Notes (review): Code-Review+2: Ian Wienand <iwienand@redhat.com> Code-Review+2: Monty Taylor <mordred@inaugust.com> Code-Review+2: Clark Boylan <cboylan@sapwetik.org> Workflow+1: Ian Wienand <iwienand@redhat.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Mon, 13 Aug 2018 22:56:14 +0000 Reviewed-on: https://review.openstack.org/585293 Project: openstack-infra/puppet-ethercalc Branch: refs/heads/master
-rw-r--r--spec/acceptance/ethercalc_spec.rb27
1 files changed, 14 insertions, 13 deletions
diff --git a/spec/acceptance/ethercalc_spec.rb b/spec/acceptance/ethercalc_spec.rb
index face6f4..aede7d0 100644
--- a/spec/acceptance/ethercalc_spec.rb
+++ b/spec/acceptance/ethercalc_spec.rb
@@ -15,6 +15,10 @@ describe 'puppet-ethercalc:: manifest', :if => ['debian', 'ubuntu'].include?(os[
15 apply_manifest(init_puppet_module, catch_failures: true) 15 apply_manifest(init_puppet_module, catch_failures: true)
16 end 16 end
17 17
18 it 'should be idempotent' do
19 apply_manifest(init_puppet_module, catch_changes: true)
20 end
21
18 describe 'required packages' do 22 describe 'required packages' do
19 describe 'os packages' do 23 describe 'os packages' do
20 required_packages = [ 24 required_packages = [
@@ -36,19 +40,16 @@ describe 'puppet-ethercalc:: manifest', :if => ['debian', 'ubuntu'].include?(os[
36 end 40 end
37 end 41 end
38 42
39 # TODO(ianw): not quite reliable ... possibly need this in a retry 43 describe 'required services' do
40 # loop for a little to let the service start up? 44 describe 'ports are open and services are reachable' do
41 45 describe port(8000) do
42 # describe 'required services' do 46 it { should be_listening }
43 # describe 'ports are open and services are reachable' do 47 end
44 # describe port(8000) do
45 # it { should be_listening }
46 # end
47 48
48 # describe command('curl http://localhost:8000 --verbose') do 49 describe command('curl http://localhost:8000 --verbose') do
49 # its(:stdout) { should contain('EtherCalc - Share the URL to your friends') } 50 its(:stdout) { should contain('EtherCalc - Share the URL to your friends') }
50 # end 51 end
51 # end 52 end
52 # end 53 end
53 54
54end 55end