Révision fa92e118
Pet rubocop
spec/classes/rules/docker_ce_spec.rb | ||
---|---|---|
17 | 17 |
it { |
18 | 18 |
is_expected.to contain_nftables__chain('DOCKER-nat').with( |
19 | 19 |
chain: 'DOCKER', |
20 |
table: 'ip-nat',
|
|
20 |
table: 'ip-nat' |
|
21 | 21 |
) |
22 | 22 |
} |
23 | 23 |
it { |
24 | 24 |
is_expected.to contain_nftables__chain('OUTPUT-nat').with( |
25 | 25 |
chain: 'OUTPUT', |
26 |
table: 'ip-nat',
|
|
26 |
table: 'ip-nat' |
|
27 | 27 |
) |
28 | 28 |
} |
29 | 29 |
it { |
30 | 30 |
is_expected.to contain_nftables__chain('INPUT-nat').with( |
31 | 31 |
chain: 'INPUT', |
32 |
table: 'ip-nat',
|
|
32 |
table: 'ip-nat' |
|
33 | 33 |
) |
34 | 34 |
} |
35 | 35 |
it { is_expected.to contain_nftables__rule('DOCKER_ISOLATION_STAGE_1-iifname').with_content('iifname "docker0" oifname != "docker0" counter jump DOCKER_ISOLATION_STAGE_2') } |
... | ... | |
47 | 47 |
it { |
48 | 48 |
is_expected.to contain_nftables__rule('POSTROUTING-docker').with( |
49 | 49 |
content: 'oifname != "docker0" ip saddr 172.17.0.0/16 counter masquerade', |
50 |
table: 'ip-nat',
|
|
50 |
table: 'ip-nat' |
|
51 | 51 |
) |
52 | 52 |
} |
53 | 53 |
it { |
54 | 54 |
is_expected.to contain_nftables__rule('PREROUTING-docker').with( |
55 | 55 |
content: 'fib daddr type local counter jump DOCKER', |
56 |
table: 'ip-nat',
|
|
56 |
table: 'ip-nat' |
|
57 | 57 |
) |
58 | 58 |
} |
59 | 59 |
it { |
60 | 60 |
is_expected.to contain_nftables__rule('OUTPUT-jump_docker@ip-nat').with( |
61 | 61 |
rulename: 'OUTPUT-jump_docker', |
62 | 62 |
content: 'ip daddr != 127.0.0.0/8 fib daddr type local counter jump DOCKER', |
63 |
table: 'ip-nat',
|
|
63 |
table: 'ip-nat' |
|
64 | 64 |
) |
65 | 65 |
} |
66 | 66 |
it { |
67 | 67 |
is_expected.to contain_nftables__rule('DOCKER-counter').with( |
68 | 68 |
content: 'iifname "docker0" counter return', |
69 |
table: 'ip-nat',
|
|
69 |
table: 'ip-nat' |
|
70 | 70 |
) |
71 | 71 |
} |
72 | 72 |
it { |
73 | 73 |
is_expected.to contain_nftables__rule('INPUT-type@ip-nat').with( |
74 | 74 |
rulename: 'INPUT-type', |
75 | 75 |
content: 'type nat hook input priority 100', |
76 |
table: 'ip-nat',
|
|
76 |
table: 'ip-nat' |
|
77 | 77 |
) |
78 | 78 |
} |
79 | 79 |
it { |
80 | 80 |
is_expected.to contain_nftables__rule('INPUT-policy@ip-nat').with( |
81 | 81 |
rulename: 'INPUT-policy', |
82 | 82 |
content: 'policy accept', |
83 |
table: 'ip-nat',
|
|
83 |
table: 'ip-nat' |
|
84 | 84 |
) |
85 | 85 |
} |
86 | 86 |
end |
... | ... | |
142 | 142 |
it { |
143 | 143 |
is_expected.to contain_nftables__rule('POSTROUTING-docker').with( |
144 | 144 |
content: 'oifname != "ifdo0" ip saddr 192.168.4.0/24 counter masquerade', |
145 |
table: 'ip-nat',
|
|
145 |
table: 'ip-nat' |
|
146 | 146 |
) |
147 | 147 |
} |
148 | 148 |
it { |
149 | 149 |
is_expected.to contain_nftables__rule('DOCKER-counter').with( |
150 | 150 |
content: 'iifname "ifdo0" counter return', |
151 |
table: 'ip-nat',
|
|
151 |
table: 'ip-nat' |
|
152 | 152 |
) |
153 | 153 |
} |
154 | 154 |
end |
Formats disponibles : Unified diff