Skip to content

Commit

Permalink
Better deal with broken docker in acceptance
Browse files Browse the repository at this point in the history
  • Loading branch information
ekohl authored and ehelms committed Apr 23, 2020
1 parent efd383a commit deb5ed3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions spec/acceptance/foreman_journald_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,15 @@ class { 'foreman':
it { is_expected.to be_installed }
end

# Logging to the journal is broken on Travis and EL7 but works in Vagrant VMs
# and regular docker containers
describe command('journalctl -u foreman'), unless: ENV['TRAVIS'] == 'true' && os[:family] == 'redhat' && os[:release] =~ /^7\./ do
# Logging to the journal is broken on Docker 18+ and EL7 but works in Vagrant
# VMs (and EL7's Docker version)
broken_journald_logging = ENV['BEAKER_HYPERVISOR'] == 'docker' && os[:family] == 'redhat' && os[:release] =~ /^7\./

describe command('journalctl -u foreman'), unless: broken_journald_logging do
its(:stdout) { is_expected.to match(%r{Redirected to https://#{host_inventory['fqdn']}/users/login}) }
end

describe command('journalctl -u dynflow-sidekiq@orchestrator'), unless: ENV['TRAVIS'] == 'true' && os[:family] == 'redhat' && os[:release] =~ /^7\./ do
describe command('journalctl -u dynflow-sidekiq@orchestrator'), unless: broken_journald_logging do
its(:stdout) { is_expected.to match(%r{Everything ready for world: }) }
end
end

0 comments on commit deb5ed3

Please sign in to comment.