Skip to content

Commit 5ca8418

Browse files
committed
fix: nftables flaky test
Make sure counters won't increase on the rule, so the test would match on zero counters. Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
1 parent a940e45 commit 5ca8418

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/app/machined/pkg/controllers/network/nftables_chain_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ func (s *NfTablesChainSuite) TestConntrackCounter() {
189189
{
190190
MatchConntrackState: &network.NfTablesConntrackStateMatch{
191191
States: []nethelpers.ConntrackState{
192-
nethelpers.ConntrackStateInvalid,
192+
nethelpers.ConntrackStateEstablished, // this rule should never match, as previous rule matches it
193193
},
194194
},
195195
AnonCounter: true,
@@ -203,7 +203,7 @@ func (s *NfTablesChainSuite) TestConntrackCounter() {
203203
chain test1 {
204204
type filter hook input priority security; policy accept;
205205
ct state { 0x2000000, 0x4000000 } accept
206-
ct state invalid counter packets 0 bytes 0 drop
206+
ct state established counter packets 0 bytes 0 drop
207207
}
208208
}`)
209209
}

0 commit comments

Comments
 (0)