aboutsummaryrefslogtreecommitdiff
path: root/spec/acceptance/ferm_spec.rb
diff options
context:
space:
mode:
authorTim <tim@bastelfreak.de>2021-10-31 18:42:03 +0100
committerTim <tim@bastelfreak.de>2021-10-31 18:42:03 +0100
commitdb73699faa6804744edc06924c43873ebb6f2932 (patch)
treee69eae8647045ab14a59cfaaf99195770b5f7fd3 /spec/acceptance/ferm_spec.rb
parent6e6a6e4d10497d03ee5c708f20fd5f0303f25121 (diff)
downloadpuppet-ferm-db73699faa6804744edc06924c43873ebb6f2932.tar.gz
puppet-ferm-db73699faa6804744edc06924c43873ebb6f2932.tar.bz2
rubocop: autofix
Diffstat (limited to 'spec/acceptance/ferm_spec.rb')
-rw-r--r--spec/acceptance/ferm_spec.rb19
1 files changed, 14 insertions, 5 deletions
diff --git a/spec/acceptance/ferm_spec.rb b/spec/acceptance/ferm_spec.rb
index 326ed9f..1a6e39e 100644
--- a/spec/acceptance/ferm_spec.rb
+++ b/spec/acceptance/ferm_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'spec_helper_acceptance'
os_name = fact('os.name')
@@ -57,6 +59,7 @@ describe 'ferm' do
it 'works with no error' do
apply_manifest(pp, catch_failures: true)
end
+
it 'works idempotently' do
apply_manifest(pp, catch_changes: true)
end
@@ -82,6 +85,7 @@ describe 'ferm' do
it 'works with no error' do
apply_manifest(pp, catch_failures: true)
end
+
it 'works idempotently' do
apply_manifest(pp, catch_changes: true)
end
@@ -101,7 +105,7 @@ describe 'ferm' do
describe iptables do
it do
- is_expected.to have_rule(iptables_output[0]). \
+ expect(subject).to have_rule(iptables_output[0]). \
with_table('filter'). \
with_chain('INPUT')
end
@@ -135,18 +139,20 @@ describe 'ferm' do
it 'works with no error' do
apply_manifest(pp, catch_failures: true)
end
+
it 'works idempotently' do
apply_manifest(pp, catch_changes: true)
end
describe iptables do
it do
- is_expected.to have_rule(iptables_output[1]). \
+ expect(subject).to have_rule(iptables_output[1]). \
with_table('filter'). \
with_chain('INPUT')
end
+
it do
- is_expected.to have_rule(iptables_output[2]). \
+ expect(subject).to have_rule(iptables_output[2]). \
with_table('filter'). \
with_chain('HTTP')
end
@@ -177,6 +183,7 @@ describe 'ferm' do
it 'works with no error' do
apply_manifest(pp2, catch_failures: true)
end
+
it 'works idempotently' do
apply_manifest(pp2, catch_changes: true)
end
@@ -223,18 +230,20 @@ describe 'ferm' do
it 'works with no error' do
apply_manifest(pp, catch_failures: true)
end
+
it 'works idempotently' do
apply_manifest(pp, catch_changes: true)
end
describe iptables do
it do
- is_expected.to have_rule(iptables_output_custom[0]). \
+ expect(subject).to have_rule(iptables_output_custom[0]). \
with_table('filter'). \
with_chain('FORWARD')
end
+
it do
- is_expected.to have_rule(iptables_output_custom[1]). \
+ expect(subject).to have_rule(iptables_output_custom[1]). \
with_table('filter'). \
with_chain('OPENVPN_FORWORD_RULES')
end