Révision c82b960a
rubocop:auto_correct results
spec/acceptance/default_spec.rb | ||
---|---|---|
1 |
# frozen_string_literal: true |
|
2 |
|
|
1 | 3 |
require 'spec_helper_acceptance' |
2 | 4 |
|
3 | 5 |
describe 'nftables class' do |
... | ... | |
50 | 52 |
it { is_expected.to be_directory } |
51 | 53 |
end |
52 | 54 |
end |
55 |
|
|
53 | 56 |
context 'with bad invalid nft rules' do |
54 | 57 |
it 'puppet fails but should leave nft service running' do |
55 | 58 |
pp = <<-EOS |
... | ... | |
76 | 79 |
EOS |
77 | 80 |
apply_manifest(pp, expect_failures: true) |
78 | 81 |
end |
82 |
|
|
79 | 83 |
describe service('nftables') do |
80 | 84 |
it { is_expected.to be_running } |
81 | 85 |
it { is_expected.to be_enabled } |
82 | 86 |
end |
83 | 87 |
end |
88 |
|
|
84 | 89 |
context 'with totally empty firewall' do |
85 | 90 |
it 'no rules validate okay' do |
86 | 91 |
pp = <<-EOS |
... | ... | |
106 | 111 |
EOS |
107 | 112 |
apply_manifest(pp, catch_failures: true) |
108 | 113 |
end |
114 |
|
|
109 | 115 |
describe service('nftables') do |
110 | 116 |
it { is_expected.to be_running } |
111 | 117 |
it { is_expected.to be_enabled } |
112 | 118 |
end |
113 | 119 |
end |
120 |
|
|
114 | 121 |
context 'with custom nat_table_name' do |
115 | 122 |
it 'no rules validate okay' do |
116 | 123 |
pp = <<-EOS |
... | ... | |
136 | 143 |
EOS |
137 | 144 |
apply_manifest(pp, catch_failures: true) |
138 | 145 |
end |
146 |
|
|
139 | 147 |
describe service('nftables') do |
140 | 148 |
it { is_expected.to be_running } |
141 | 149 |
it { is_expected.to be_enabled } |
Formats disponibles : Unified diff