Fix TestGetConntrackMax to align with capped conntrack max values

This commit is contained in:
shwetha-s-poojary
2026-03-18 15:25:21 +05:30
parent 4e859569e5
commit 467ce9c6cd

View File

@@ -37,6 +37,7 @@ import (
func TestGetConntrackMax(t *testing.T) {
ncores := runtime.NumCPU()
const maxLimit = 1048576
testCases := []struct {
min int32
maxPerCore int32
@@ -49,7 +50,7 @@ func TestGetConntrackMax(t *testing.T) {
{
maxPerCore: 67890, // use this if Max is 0
min: 1, // avoid 0 default
expected: 67890 * ncores,
expected: min(67890*ncores, maxLimit),
},
{
maxPerCore: 1, // ensure that Min is considered