@@ -194,7 +194,7 @@ func TestProcessorSingleInterface(t *testing.T) {
194194 garps := collect (garpSent )
195195 require .Len (t , garps , 1 )
196196 require .Equal (t , garps [0 ].addr .String (), ep1 .IPv4 .String ())
197- require .Equal (t , garps [0 ].iface .iface . Name , cfg .L2PodAnnouncementsInterface )
197+ require .Equal (t , garps [0 ].iface .Name () , cfg .L2PodAnnouncementsInterface )
198198
199199 // On second event we expect no GARP to be sent.
200200 proc .EndpointCreated (ep1 )
@@ -205,7 +205,7 @@ func TestProcessorSingleInterface(t *testing.T) {
205205 garps = collect (garpSent )
206206 require .Len (t , garps , 1 )
207207 require .Equal (t , garps [0 ].addr .String (), ep2 .IPv4 .String ())
208- require .Equal (t , garps [0 ].iface .iface . Name , cfg .L2PodAnnouncementsInterface )
208+ require .Equal (t , garps [0 ].iface .Name () , cfg .L2PodAnnouncementsInterface )
209209
210210 // Second event for second endpoint should not trigger a GARP.
211211 proc .EndpointCreated (ep2 )
@@ -220,7 +220,7 @@ func TestProcessorSingleInterface(t *testing.T) {
220220 garps = collect (garpSent )
221221 require .Len (t , garps , 1 )
222222 require .Equal (t , garps [0 ].addr .String (), ep1 .IPv4 .String ())
223- require .Equal (t , garps [0 ].iface .iface . Name , cfg .L2PodAnnouncementsInterface )
223+ require .Equal (t , garps [0 ].iface .Name () , cfg .L2PodAnnouncementsInterface )
224224
225225 // But GARP should still not be set for recreated ep2.
226226 proc .EndpointCreated (ep2 )
@@ -241,8 +241,8 @@ func TestProcessorHappyPathMultipleInterface(t *testing.T) {
241241 garps := collect (garpSent )
242242 require .Len (t , garps , 2 )
243243 require .Equal (t , garps [0 ].addr .String (), ep1 .IPv4 .String ())
244- gotEth0 := garps [0 ].iface .iface . Name == "eth0" || garps [1 ].iface .iface . Name == "eth0"
245- gotEns1 := garps [0 ].iface .iface . Name == "ens1" || garps [1 ].iface .iface . Name == "ens1"
244+ gotEth0 := garps [0 ].iface .Name () == "eth0" || garps [1 ].iface .Name () == "eth0"
245+ gotEns1 := garps [0 ].iface .Name () == "ens1" || garps [1 ].iface .Name () == "ens1"
246246 if ! (gotEth0 && gotEns1 ) {
247247 t .Fatalf ("Expected GARP to be sent on both eth0 and ens1, got: %v" , garps )
248248 }
@@ -261,7 +261,7 @@ func TestProcessorOnlySelected(t *testing.T) {
261261 garps := collect (garpSent )
262262 for _ , d := range fakeDevices {
263263 contains := slices .ContainsFunc (garps , func (g fakeGarp ) bool {
264- return g .iface .iface . Name == d .Name
264+ return g .iface .Name () == d .Name
265265 })
266266 if d .Selected && ! contains {
267267 t .Fatalf ("Expected GARP to be sent on selected interface %s" , d .Name )
0 commit comments