@@ -1392,12 +1392,12 @@ func TestPluginSwiftV2MultipleAddDelete(t *testing.T) {
13921392 Plugin : plugin ,
13931393 nm : acnnetwork .NewMockNetworkmanager (acnnetwork .NewMockEndpointClient (nil )),
13941394 ipamInvoker : NewCustomMockIpamInvoker (map [string ]acnnetwork.InterfaceInfo {
1395- "eth0-1" : {
1396- NICType : cns .NodeNetworkInterfaceFrontendNIC ,
1397- },
13981395 "eth0" : {
13991396 NICType : cns .InfraNIC ,
14001397 },
1398+ "eth2" : {
1399+ NICType : cns .NodeNetworkInterfaceFrontendNIC ,
1400+ },
14011401 }),
14021402 report : & telemetry.CNIReport {},
14031403 tb : & telemetry.TelemetryBuffer {},
@@ -1417,7 +1417,7 @@ func TestPluginSwiftV2MultipleAddDelete(t *testing.T) {
14171417 Plugin : plugin ,
14181418 nm : acnnetwork .NewMockNetworkmanager (acnnetwork .NewMockEndpointClient (nil )),
14191419 ipamInvoker : NewCustomMockIpamInvoker (map [string ]acnnetwork.InterfaceInfo {
1420- "eth0-1 " : {
1420+ "eth1 " : {
14211421 NICType : cns .NodeNetworkInterfaceAccelnetFrontendNIC ,
14221422 },
14231423 "eth0" : {
@@ -1442,15 +1442,15 @@ func TestPluginSwiftV2MultipleAddDelete(t *testing.T) {
14421442 Plugin : plugin ,
14431443 nm : acnnetwork .NewMockNetworkmanager (acnnetwork .NewMockEndpointClient (nil )),
14441444 ipamInvoker : NewCustomMockIpamInvoker (map [string ]acnnetwork.InterfaceInfo {
1445- "eth0-2" : {
1445+ "eth0" : {
1446+ NICType : cns .InfraNIC ,
1447+ },
1448+ "eth1" : {
14461449 NICType : cns .NodeNetworkInterfaceAccelnetFrontendNIC ,
14471450 },
1448- "eth0-1 " : {
1451+ "eth2 " : {
14491452 NICType : cns .NodeNetworkInterfaceFrontendNIC ,
14501453 },
1451- "eth0" : {
1452- NICType : cns .InfraNIC ,
1453- },
14541454 }),
14551455 report : & telemetry.CNIReport {},
14561456 tb : & telemetry.TelemetryBuffer {},
@@ -1470,12 +1470,12 @@ func TestPluginSwiftV2MultipleAddDelete(t *testing.T) {
14701470 Plugin : plugin ,
14711471 nm : acnnetwork .NewMockNetworkmanager (acnnetwork .NewMockEndpointClient (nil )),
14721472 ipamInvoker : NewCustomMockIpamInvoker (map [string ]acnnetwork.InterfaceInfo {
1473- "eth0-1" : {
1474- NICType : cns .BackendNIC ,
1475- },
14761473 "eth0" : {
14771474 NICType : cns .InfraNIC ,
14781475 },
1476+ "eth1" : {
1477+ NICType : cns .BackendNIC ,
1478+ },
14791479 }),
14801480 report : & telemetry.CNIReport {},
14811481 tb : & telemetry.TelemetryBuffer {},
@@ -1495,10 +1495,10 @@ func TestPluginSwiftV2MultipleAddDelete(t *testing.T) {
14951495 Plugin : plugin ,
14961496 nm : acnnetwork .NewMockNetworkmanager (acnnetwork .NewMockEndpointClient (nil )),
14971497 ipamInvoker : NewCustomMockIpamInvoker (map [string ]acnnetwork.InterfaceInfo {
1498- "eth0 " : {
1498+ "eth1 " : {
14991499 NICType : cns .NodeNetworkInterfaceFrontendNIC ,
15001500 },
1501- "eth0-1 " : {
1501+ "eth2 " : {
15021502 NICType : cns .NodeNetworkInterfaceFrontendNIC ,
15031503 },
15041504 }),
@@ -1520,10 +1520,10 @@ func TestPluginSwiftV2MultipleAddDelete(t *testing.T) {
15201520 Plugin : plugin ,
15211521 nm : acnnetwork .NewMockNetworkmanager (acnnetwork .NewMockEndpointClient (nil )),
15221522 ipamInvoker : NewCustomMockIpamInvoker (map [string ]acnnetwork.InterfaceInfo {
1523- "eth0 " : {
1523+ "eth1 " : {
15241524 NICType : cns .NodeNetworkInterfaceAccelnetFrontendNIC ,
15251525 },
1526- "eth0-1 " : {
1526+ "eth2 " : {
15271527 NICType : cns .NodeNetworkInterfaceAccelnetFrontendNIC ,
15281528 },
15291529 }),
@@ -1556,7 +1556,7 @@ func TestPluginSwiftV2MultipleAddDelete(t *testing.T) {
15561556 "eth0" : {
15571557 NICType : cns .InfraNIC ,
15581558 },
1559- "eth0-1 " : {
1559+ "eth1 " : {
15601560 NICType : cns .NodeNetworkInterfaceFrontendNIC ,
15611561 },
15621562 }),
@@ -1588,7 +1588,7 @@ func TestPluginSwiftV2MultipleAddDelete(t *testing.T) {
15881588 "eth0" : {
15891589 NICType : cns .NodeNetworkInterfaceFrontendNIC ,
15901590 },
1591- "eth0-1 " : {
1591+ "eth1 " : {
15921592 NICType : cns .NodeNetworkInterfaceAccelnetFrontendNIC ,
15931593 },
15941594 }),
@@ -1620,7 +1620,7 @@ func TestPluginSwiftV2MultipleAddDelete(t *testing.T) {
16201620 "eth0" : {
16211621 NICType : cns .InfraNIC ,
16221622 },
1623- "eth0-1 " : {
1623+ "eth1 " : {
16241624 NICType : cns .NodeNetworkInterfaceAccelnetFrontendNIC ,
16251625 },
16261626 }),
@@ -1655,7 +1655,7 @@ func TestPluginSwiftV2MultipleAddDelete(t *testing.T) {
16551655 if ep .NICType == cns .InfraNIC {
16561656 require .Equal (t , "test-con-" + tt .args .IfName , ep .EndpointID , "infra nic must use ifname for its endpoint id" )
16571657 } else {
1658- require .Regexp (t , `test-con- \d+$` , ep .EndpointID , "other nics must use an index for their endpoint ids" )
1658+ require .Regexp (t , `\d+$` , ep .EndpointID , "other nics must use an index for their endpoint ids" )
16591659 }
16601660 }
16611661
0 commit comments