mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-01 18:58:18 +00:00
add syncNetworkUtil in kubelet
This commit is contained in:
@@ -217,3 +217,25 @@ func TestCleanupBandwidthLimits(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetIPTablesMark(t *testing.T) {
|
||||
tests := []struct {
|
||||
bit int
|
||||
expect string
|
||||
}{
|
||||
{
|
||||
14,
|
||||
"0x00004000/0x00004000",
|
||||
},
|
||||
{
|
||||
15,
|
||||
"0x00008000/0x00008000",
|
||||
},
|
||||
}
|
||||
for _, tc := range tests {
|
||||
res := getIPTablesMark(tc.bit)
|
||||
if res != tc.expect {
|
||||
t.Errorf("getIPTablesMark output unexpected result: %v when input bit is %d. Expect result: %v", res, tc.bit, tc.expect)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user