add syncNetworkUtil in kubelet

This commit is contained in:
Minhan Xia
2016-08-10 14:29:48 -07:00
parent 85fdeb4742
commit 3bf8679232
4 changed files with 169 additions and 6 deletions

View File

@@ -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)
}
}
}