From 2c66f923052f4d7a013fb26fe4e3f8ee39fb5d82 Mon Sep 17 00:00:00 2001 From: Julien Pivotto Date: Thu, 15 Sep 2016 11:55:37 +0200 Subject: [PATCH] Reduce logs verbosity Avoid "The log length has exceeded the limit of 4 MB (this usually means that the test suite is raising the same exception over and over)." Signed-off-by: Julien Pivotto --- CHANGELOG.md | 2 +- spec/acceptance/basic_spec.rb | 2 +- spec/acceptance/corosync_class_spec.rb | 2 +- spec/acceptance/cs_colocation_spec.rb | 2 +- spec/acceptance/cs_commit_spec.rb | 2 +- spec/acceptance/cs_location_spec.rb | 12 ++++++------ spec/acceptance/cs_order_spec.rb | 8 ++++---- spec/acceptance/cs_primitive_spec.rb | 20 ++++++++++---------- spec/acceptance/cs_rsc_defaults_spec.rb | 4 ++-- 9 files changed, 27 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57bf6687..b1c184f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ - Add autorequirement between cs\_location and cs\_primitives/cs\_clone (#359) - Add autorequirement between cs\_clone and cs\_primitive (#357, #365) - Add "Managed By Puppet" header to corosync.conf (#360) -- Improve tests (#335, #337, #331, #328, #364) +- Improve tests (#335, #337, #331, #328, #364, #369) - Modulesync (#330) ### Backward incompatible changes diff --git a/spec/acceptance/basic_spec.rb b/spec/acceptance/basic_spec.rb index aae18e39..d21c76dc 100644 --- a/spec/acceptance/basic_spec.rb +++ b/spec/acceptance/basic_spec.rb @@ -40,7 +40,7 @@ class { 'corosync': EOS apply_manifest(pp, catch_failures: true, debug: true, trace: true) - apply_manifest(pp, catch_changes: true, debug: true, trace: true) + apply_manifest(pp, catch_changes: true, debug: false, trace: true) end describe service('corosync') do diff --git a/spec/acceptance/corosync_class_spec.rb b/spec/acceptance/corosync_class_spec.rb index f0402730..42d0e003 100644 --- a/spec/acceptance/corosync_class_spec.rb +++ b/spec/acceptance/corosync_class_spec.rb @@ -40,7 +40,7 @@ class { 'corosync': EOS apply_manifest(pp, catch_failures: true, debug: true, trace: true) - apply_manifest(pp, catch_changes: true, debug: true, trace: true) + apply_manifest(pp, catch_changes: true, debug: false, trace: true) end describe service('corosync') do diff --git a/spec/acceptance/cs_colocation_spec.rb b/spec/acceptance/cs_colocation_spec.rb index 8e94e1f6..74ad98a4 100644 --- a/spec/acceptance/cs_colocation_spec.rb +++ b/spec/acceptance/cs_colocation_spec.rb @@ -58,7 +58,7 @@ class { 'corosync': EOS apply_manifest(pp, catch_failures: true, debug: true, trace: true) - apply_manifest(pp, catch_changes: true, debug: true, trace: true) + apply_manifest(pp, catch_changes: true, debug: false, trace: true) end describe service('corosync') do diff --git a/spec/acceptance/cs_commit_spec.rb b/spec/acceptance/cs_commit_spec.rb index 143bbf37..9c2c5b6b 100644 --- a/spec/acceptance/cs_commit_spec.rb +++ b/spec/acceptance/cs_commit_spec.rb @@ -72,7 +72,7 @@ class { 'corosync': EOS apply_manifest(pp, catch_failures: true, debug: true, trace: true) - apply_manifest(pp, catch_changes: true, debug: true, trace: true) + apply_manifest(pp, catch_changes: true, debug: false, trace: true) end describe service('corosync') do diff --git a/spec/acceptance/cs_location_spec.rb b/spec/acceptance/cs_location_spec.rb index 8f774c46..5d4af00f 100755 --- a/spec/acceptance/cs_location_spec.rb +++ b/spec/acceptance/cs_location_spec.rb @@ -48,7 +48,7 @@ class { 'corosync': EOS apply_manifest(pp, catch_failures: true, debug: true, trace: true) - apply_manifest(pp, catch_changes: true, debug: true, trace: true) + apply_manifest(pp, catch_changes: true, debug: false, trace: true) end describe service('corosync') do @@ -64,7 +64,7 @@ class { 'corosync': } EOS apply_manifest(pp, catch_failures: true, debug: true, trace: true) - apply_manifest(pp, catch_changes: true, debug: true, trace: true) + apply_manifest(pp, catch_changes: true, debug: false, trace: true) shell('cibadmin --query | grep duncan_vip_there') do |r| expect(r.stdout).to match(%r{rsc_location}) end @@ -77,7 +77,7 @@ class { 'corosync': } EOS apply_manifest(pp, catch_failures: true, debug: true, trace: true) - apply_manifest(pp, catch_changes: true, debug: true, trace: true) + apply_manifest(pp, catch_changes: true, debug: false, trace: true) assert_raises(Beaker::Host::CommandFailure) do shell('cibadmin --query | grep duncan_vip_there') end @@ -93,7 +93,7 @@ class { 'corosync': } EOS apply_manifest(pp, catch_failures: true, debug: true, trace: true) - apply_manifest(pp, catch_changes: true, debug: true, trace: true) + apply_manifest(pp, catch_changes: true, debug: false, trace: true) shell('cibadmin --query | grep duncan_vip_there') do |r| expect(r.stdout).to match(%r{rsc_location}) end @@ -135,7 +135,7 @@ class { 'corosync': } EOS apply_manifest(pp, catch_failures: true, debug: true, trace: true) - apply_manifest(pp, catch_changes: true, debug: true, trace: true) + apply_manifest(pp, catch_changes: true, debug: false, trace: true) end # attribute order in XML might be non-deterministic @@ -194,7 +194,7 @@ class { 'corosync': } EOS apply_manifest(pp, catch_failures: true, debug: true, trace: true) - apply_manifest(pp, catch_changes: true, debug: true, trace: true) + apply_manifest(pp, catch_changes: true, debug: false, trace: true) end # attribute order in XML might be non-deterministic diff --git a/spec/acceptance/cs_order_spec.rb b/spec/acceptance/cs_order_spec.rb index 3bec1864..73f52493 100644 --- a/spec/acceptance/cs_order_spec.rb +++ b/spec/acceptance/cs_order_spec.rb @@ -55,7 +55,7 @@ class { 'corosync': EOS apply_manifest(pp, expect_changes: true, debug: true, trace: true) - apply_manifest(pp, catch_changes: true, debug: true, trace: true) + apply_manifest(pp, catch_changes: true, debug: false, trace: true) end describe service('corosync') do @@ -70,7 +70,7 @@ class { 'corosync': } EOS apply_manifest(pp, expect_changes: true, debug: true, trace: true) - apply_manifest(pp, catch_changes: true, debug: true, trace: true) + apply_manifest(pp, catch_changes: true, debug: false, trace: true) shell('cibadmin --query | grep first_then_two') do |r| expect(r.stdout).to match(%r{rsc_order}) end @@ -115,7 +115,7 @@ class { 'corosync': } EOS apply_manifest(pp, expect_changes: true, debug: true, trace: true) - apply_manifest(pp, catch_changes: true, debug: true, trace: true) + apply_manifest(pp, catch_changes: true, debug: false, trace: true) assert_raises(Beaker::Host::CommandFailure) do shell('cibadmin --query | grep first_then_two') end @@ -130,7 +130,7 @@ class { 'corosync': } EOS apply_manifest(pp, expect_changes: true, debug: true, trace: true) - apply_manifest(pp, catch_changes: true, debug: true, trace: true) + apply_manifest(pp, catch_changes: true, debug: false, trace: true) shell('cibadmin --query | grep one_then_two_complex') do |r| expect(r.stdout).to match(%r{rsc_order}) end diff --git a/spec/acceptance/cs_primitive_spec.rb b/spec/acceptance/cs_primitive_spec.rb index a5fe61d9..d56be280 100644 --- a/spec/acceptance/cs_primitive_spec.rb +++ b/spec/acceptance/cs_primitive_spec.rb @@ -55,7 +55,7 @@ class { 'corosync': EOS apply_manifest(pp, catch_failures: true, debug: true, trace: true) - apply_manifest(pp, catch_changes: true, debug: true, trace: true) + apply_manifest(pp, catch_changes: true, debug: false, trace: true) end describe service('corosync') do @@ -90,7 +90,7 @@ class { 'corosync': } EOS apply_manifest(pp, expect_changes: true, debug: true, trace: true) - apply_manifest(pp, catch_changes: true, debug: true, trace: true) + apply_manifest(pp, catch_changes: true, debug: false, trace: true) shell('cibadmin --query') do |r| expect(r.stdout).to match(%r{haproxy_vip}) end @@ -107,12 +107,12 @@ class { 'corosync': } EOS apply_manifest(pp, expect_changes: true, debug: true, trace: true) - apply_manifest(pp, catch_changes: true, debug: true, trace: true) + apply_manifest(pp, catch_changes: true, debug: false, trace: true) shell('crm_resource -r test_stop -m -p target-role -v Stopped') apply_manifest(pp, expect_changes: true, debug: true, trace: true) - apply_manifest(pp, catch_changes: true, debug: true, trace: true) + apply_manifest(pp, catch_changes: true, debug: false, trace: true) end it 'respects unmanaged_metadata' do @@ -127,11 +127,11 @@ class { 'corosync': } EOS apply_manifest(pp, expect_changes: true, debug: true, trace: true) - apply_manifest(pp, catch_changes: true, debug: true, trace: true) + apply_manifest(pp, catch_changes: true, debug: false, trace: true) shell('crm_resource -r test_stop2 -m -p target-role -v Stopped') - apply_manifest(pp, catch_changes: true, debug: true, trace: true) + apply_manifest(pp, catch_changes: true, debug: false, trace: true) pp = <<-EOS cs_primitive { 'test_stop2': @@ -144,7 +144,7 @@ class { 'corosync': EOS apply_manifest(pp, expect_changes: true, debug: true, trace: true) - apply_manifest(pp, catch_changes: true, debug: true, trace: true) + apply_manifest(pp, catch_changes: true, debug: false, trace: true) end it 'accepts 2 metadata names in unmanaged_metadata' do @@ -159,7 +159,7 @@ class { 'corosync': } EOS apply_manifest(pp, expect_changes: true, debug: true, trace: true) - apply_manifest(pp, catch_changes: true, debug: true, trace: true) + apply_manifest(pp, catch_changes: true, debug: false, trace: true) end it 'does set is-managed in test_md' do @@ -186,7 +186,7 @@ class { 'corosync': } EOS - apply_manifest(pp, catch_changes: true, debug: true, trace: true) + apply_manifest(pp, catch_changes: true, debug: false, trace: true) end it 'does not delete or change is-managed if it is in unmanaged_metadata' do @@ -214,7 +214,7 @@ class { 'corosync': EOS apply_manifest(pp, expect_changes: true, debug: true, trace: true) - apply_manifest(pp, catch_changes: true, debug: true, trace: true) + apply_manifest(pp, catch_changes: true, debug: false, trace: true) end it 'does delete is-managed because it is no longer in unmanaged_metadata' do diff --git a/spec/acceptance/cs_rsc_defaults_spec.rb b/spec/acceptance/cs_rsc_defaults_spec.rb index 3f765f47..290ac0fc 100644 --- a/spec/acceptance/cs_rsc_defaults_spec.rb +++ b/spec/acceptance/cs_rsc_defaults_spec.rb @@ -42,7 +42,7 @@ class { 'corosync': EOS apply_manifest(pp, catch_failures: true, debug: true, trace: true) - apply_manifest(pp, catch_changes: true, debug: true, trace: true) + apply_manifest(pp, catch_changes: true, debug: false, trace: true) shell('cibadmin --query') do |r| expect(r.stdout).to match(%r{resource-stickiness.*98898}) @@ -56,7 +56,7 @@ class { 'corosync': } EOS apply_manifest(pp, expect_changes: true, debug: true, trace: true) - apply_manifest(pp, catch_changes: true, debug: true, trace: true) + apply_manifest(pp, catch_changes: true, debug: false, trace: true) shell('cibadmin --query') do |r| expect(r.stdout).not_to match(%r{resource-stickiness.*98898})