Merge pull request #108351 from mengjiao-liu/fix_ipset_test

Fix incorrect test cases to cover code that needs to be tested in `TestValidateIPSet`
This commit is contained in:
Kubernetes Prow Robot 2022-03-18 15:01:56 -07:00 committed by GitHub
commit 54ee338758
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -927,7 +927,7 @@ func TestValidateIPSet(t *testing.T) {
{ // case[3] { // case[3]
ipset: &IPSet{ ipset: &IPSet{
Name: "bar", Name: "bar",
SetType: BitmapPort, SetType: HashIPPort,
HashFamily: ProtocolFamilyIPV6, HashFamily: ProtocolFamilyIPV6,
HashSize: 0, HashSize: 0,
MaxElem: 2048, MaxElem: 2048,
@ -938,7 +938,7 @@ func TestValidateIPSet(t *testing.T) {
{ // case[4] { // case[4]
ipset: &IPSet{ ipset: &IPSet{
Name: "baz", Name: "baz",
SetType: BitmapPort, SetType: HashIPPort,
HashFamily: ProtocolFamilyIPV6, HashFamily: ProtocolFamilyIPV6,
HashSize: 1024, HashSize: 1024,
MaxElem: -1, MaxElem: -1,