From deb5ed355e558ee6b85209051534adaeabb7e421 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Thu, 23 Apr 2020 13:51:41 +0200 Subject: [PATCH] Better deal with broken docker in acceptance --- spec/acceptance/foreman_journald_spec.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/spec/acceptance/foreman_journald_spec.rb b/spec/acceptance/foreman_journald_spec.rb index bae49f556..9d6b829a8 100644 --- a/spec/acceptance/foreman_journald_spec.rb +++ b/spec/acceptance/foreman_journald_spec.rb @@ -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