41 lines
740 B
Go
41 lines
740 B
Go
package upnp
|
|
|
|
import (
|
|
"testing"
|
|
|
|
omd "git.loafle.net/overflow/model/discovery"
|
|
omm "git.loafle.net/overflow/model/meta"
|
|
"git.loafle.net/overflow_scanner/probe/model"
|
|
)
|
|
|
|
func TestScan(t *testing.T) {
|
|
type args struct {
|
|
discovered model.Discovered
|
|
}
|
|
tests := []struct {
|
|
name string
|
|
args args
|
|
}{
|
|
// TODO: Add test cases.
|
|
{
|
|
name: "1",
|
|
args: args{
|
|
discovered: model.New(
|
|
&omd.Zone{
|
|
Network: "192.168.1.0/24",
|
|
Iface: "enp3s0",
|
|
MetaIPType: omm.ToMetaIPType(omm.MetaIPTypeEnumV4),
|
|
Address: "192.168.1.101",
|
|
Mac: "44:8a:5b:f1:f1:f3",
|
|
},
|
|
),
|
|
},
|
|
},
|
|
}
|
|
for _, tt := range tests {
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
Scan(tt.args.discovered)
|
|
})
|
|
}
|
|
}
|