aboutsummaryrefslogtreecommitdiff
path: root/spec/acceptance
diff options
context:
space:
mode:
authorTim Meusel <tim@bastelfreak.de>2021-10-31 19:00:59 +0100
committerGitHub <noreply@github.com>2021-10-31 19:00:59 +0100
commitcb55a971350d32c52cdc49b947f08a815d90ac2a (patch)
treee69eae8647045ab14a59cfaaf99195770b5f7fd3 /spec/acceptance
parent4f2879e76556a7bc3f43fdd329fae05a46143e21 (diff)
parentdb73699faa6804744edc06924c43873ebb6f2932 (diff)
downloadpuppet-ferm-cb55a971350d32c52cdc49b947f08a815d90ac2a.tar.gz
puppet-ferm-cb55a971350d32c52cdc49b947f08a815d90ac2a.tar.bz2
Merge pull request #142 from voxpupuli/modulesync
modulesync 5.0.0
Diffstat (limited to 'spec/acceptance')
-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