Skip to content

Commit

Permalink
Move class test to run first for Debian 9
Browse files Browse the repository at this point in the history
  • Loading branch information
Helen Campbell committed Jun 18, 2018
1 parent fab2381 commit 61daea2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions spec/acceptance/apt_key_provider_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ def apply_manifest_twice(manifest_pp)
end

describe 'ensure =>' do
context 'when absent' do
context 'when absent', unless: (fact('operatingsystem') == 'Debian' && fact('operatingsystemmajrelease') == '8') do
it 'is removed' do
# Install the key first (retry because key pool may timeout)
install_key(CENTOS_GPG_KEY_FINGERPRINT)
Expand Down Expand Up @@ -682,7 +682,7 @@ def apply_manifest_twice(manifest_pp)
context 'with nonexistant.key.server' do
it 'fails' do
apply_manifest(nonexistant_key_server_pp, expect_failures: true) do |r|
expect(r.stderr).to match(%r{(Host not found|Couldn't resolve host)})
expect(r.stderr).to match(%r{(Host not found|Couldn't resolve host|No name)})
end
end
end
Expand Down
5 changes: 5 additions & 0 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ def retry_on_error_matching(max_retry_count = 3, retry_wait_interval_secs = 5, e
RSpec.configure do |c|
File.expand_path(File.join(File.dirname(__FILE__), '..'))

# dirmngr needs installed on Debian 9 machines to allow the tests to run
if fact('osfamily') == 'Debian' && fact('operatingsystemmajrelease') == '9'
shell('yes | sudo apt-get update && yes | sudo apt-get install dirmngr')
end

# Readable test descriptions
c.formatter = :documentation

Expand Down

0 comments on commit 61daea2

Please sign in to comment.