From 02db528c8a8d01a23193c6b8429756f7382c797b Mon Sep 17 00:00:00 2001 From: bobz965 Date: Sat, 7 Sep 2024 13:06:07 +0800 Subject: [PATCH] fix: ipam ut name conflicts Signed-off-by: bobz965 --- pkg/ipam/ipam_test.go | 6 +++--- pkg/ipam/subnet_test.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/ipam/ipam_test.go b/pkg/ipam/ipam_test.go index 7062b714389..e49383466d5 100644 --- a/pkg/ipam/ipam_test.go +++ b/pkg/ipam/ipam_test.go @@ -715,7 +715,7 @@ func TestIPAMAddOrUpdateSubnet(t *testing.T) { require.Error(t, err) } -func TestAddOrUpdateIPPool(t *testing.T) { +func TestIPAMAddOrUpdateIPPool(t *testing.T) { // test v4 subnet ipam := NewIPAM() v4ExcludeIps := []string{ @@ -780,7 +780,7 @@ func TestAddOrUpdateIPPool(t *testing.T) { require.Error(t, err) } -func TestRemoveIPPool(t *testing.T) { +func TestIPAMRemoveIPPool(t *testing.T) { // test dual stack subnet ipam := NewIPAM() dualSubnetName := "dualSubnet" @@ -813,7 +813,7 @@ func TestRemoveIPPool(t *testing.T) { ipam.RemoveIPPool(dualSubnetName, nonExistPoolName) } -func TestIPPoolStatistics(t *testing.T) { +func TestIPAMIPPoolStatistics(t *testing.T) { // test dual stack subnet ipam := NewIPAM() dualSubnetName := "dualSubnet" diff --git a/pkg/ipam/subnet_test.go b/pkg/ipam/subnet_test.go index 609d6b7b489..6b183ca5367 100644 --- a/pkg/ipam/subnet_test.go +++ b/pkg/ipam/subnet_test.go @@ -573,7 +573,7 @@ func TestReleaseAddrForDualSubnet(t *testing.T) { require.False(t, subnet.ContainAddress(v6)) } -func TestAddOrUpdateIPPool(t *testing.T) { +func TestSubnetAddOrUpdateIPPool(t *testing.T) { excludeIps := []string{ "10.0.0.2", "10.0.0.4", "10.0.0.100", "10.0.0.252", "10.0.0.253", "10.0.0.254", @@ -807,7 +807,7 @@ func TestAddOrUpdateIPPool(t *testing.T) { require.Equal(t, defaultPool.V6Using.String(), "") } -func TestRemoveIPPool(t *testing.T) { +func TestSubnetRemoveIPPool(t *testing.T) { excludeIps := []string{ "10.0.0.2", "10.0.0.4", "10.0.0.100", "10.0.0.252", "10.0.0.253", "10.0.0.254", @@ -895,7 +895,7 @@ func TestRemoveIPPool(t *testing.T) { require.Equal(t, 1, len(subnet.IPPools)) } -func TestIPPoolStatistics(t *testing.T) { +func TestSubnetIPPoolStatistics(t *testing.T) { excludeIps := []string{ "10.0.0.2", "10.0.0.4", "10.0.0.100", "10.0.0.252", "10.0.0.253", "10.0.0.254",