Files
Dima GolomozyandGitHub 40946831b9 goreplay-cli package (#1148)
change package from `main -> goreplay`
this will allow importing `goreplay` as a package
2023-01-12 18:24:45 +03:00

23 lines
385 B
Go

package capture
import (
"testing"
)
func TestSetInterfaces(t *testing.T) {
listener := &Listener{
loopIndex: 99999,
}
listener.setInterfaces()
for _, nic := range listener.Interfaces {
if (len(nic.Addresses)) == 0 {
t.Errorf("nic %s was captured with 0 addresses", nic.Name)
}
}
if listener.loopIndex == 99999 {
t.Errorf("loopback nic index was not found")
}
}