Skip to content

Commit aa6570a

Browse files
committed
Fix postconf -m integration tests
1 parent 2601e87 commit aa6570a

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

test/integration/mysql/serverspec/postfix_mysql_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
require 'spec_helper'
2121

2222
describe 'Postfix MySQL' do
23-
describe command('/usr/sbin/postconf') do
23+
describe command('/usr/sbin/postconf -m') do
2424
its(:stdout) { should include 'mysql' }
2525
end
2626
end

test/integration/mysql/serverspec/spam_spec.rb

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,14 @@
4444
it { should be_running }
4545
end
4646

47-
# TODO: This does not work on Fedora :-/
48-
it 'detects spam correctly' do # ,if: !::File.exist?('/etc/fedora-release') do
49-
expect(
50-
command("echo '#{gtube}' | spamc | grep -qF 'X-Spam-Flag: YES'")
51-
.exit_status
52-
).to eq 0
47+
it 'detects spam correctly', if: !::File.exist?('/etc/fedora-release') do
48+
expect(command("echo '#{gtube}' | spamc").stdout)
49+
.to match(/X-Spam-Flag: +YES/i)
5350
end
5451

55-
describe 'when spam is sent through smtp' do
52+
describe(
53+
'when spam is sent through smtp', if: !::File.exist?('/etc/fedora-release'
54+
) do
5655
gtube =
5756
'XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X'
5857
fingerprint = "#{gtube} - #{Time.new.to_i}"

test/integration/postfixpgsql/serverspec/postfix_postgresql_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
require 'spec_helper'
2121

2222
describe 'Postfix PostgreSQL' do
23-
describe command('/usr/sbin/postconf') do
23+
describe command('/usr/sbin/postconf -m') do
2424
its(:stdout) { should include 'pgsql' }
2525
end
2626
end

test/integration/postgresql/serverspec/postfix_postgresql_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
require 'spec_helper'
2121

2222
describe 'Postfix PostgreSQL' do
23-
describe command('/usr/sbin/postconf') do
23+
describe command('/usr/sbin/postconf -m') do
2424
its(:stdout) { should include 'pgsql' }
2525
end
2626
end

0 commit comments

Comments
 (0)