Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tests to ignore warnings but still look for errors #158

Merged
merged 1 commit into from
Jun 2, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions spec/acceptance/class_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@

# Apply twice to ensure no errors the second time.
apply_manifest(pp, :catch_failures => true) do |r|
expect(r.stderr).to eq("")
expect(r.stderr).not_to match(/error/i)
end
apply_manifest(pp, :catch_failures => true) do |r|
expect(r.stderr).to eq("")
expect(r.stderr).not_to eq(/error/i)

expect(r.exit_code).to be_zero
end
end
Expand All @@ -19,7 +20,7 @@
pp = "class { 'ntp': service_ensure => stopped }"

apply_manifest(pp, :catch_failures => true) do |r|
expect(r.stderr).to eq("")
expect(r.stderr).not_to match(/error/i)
end
end
end
Expand All @@ -29,7 +30,7 @@
pp = "class { 'ntp': service_ensure => running }"

apply_manifest(pp, :catch_failures => true) do |r|
expect(r.stderr).to eq("")
expect(r.stderr).not_to match(/error/i)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/ntp_parameters_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
pp = "class { 'ntp': }"

apply_manifest(pp, :catch_failures => true) do |r|
expect(r.stderr).to eq("")
expect(r.stderr).not_to match(/error/i)
end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/preferred_servers_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class { '::ntp':

it 'applies cleanly' do
apply_manifest(pp, :catch_failures => true) do |r|
expect(r.stderr).to eq("")
expect(r.stderr).not_to match(/error/i)
end
end

Expand Down
3 changes: 2 additions & 1 deletion spec/acceptance/restrict_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
it 'runs twice' do
2.times do
apply_manifest(pp, :catch_failures => true) do |r|
expect(r.stderr).to be_empty
expect(r.stderr).not_to match(/error/i)
expect(r.exit_code).to be_zero
end
end
end
Expand Down