Don't use the USP-RPS as a test device
The [USP-RPS](https://store.ui.com/products/usp-rps) is a "switch" (has `usw` type) but it doesn't have ports and so the port override tests will fail. Just ignore these devices.
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"regexp"
|
||||
"strings"
|
||||
"sync"
|
||||
"testing"
|
||||
|
||||
@@ -33,10 +32,16 @@ func allocateDevice(t *testing.T) (string, func()) {
|
||||
}
|
||||
|
||||
for _, device := range devices {
|
||||
// TODO: Check device type instead of MAC address.
|
||||
if strings.HasPrefix(device.MAC, "00:27:22:") {
|
||||
devicesAvailable = append(devicesAvailable, device.MAC)
|
||||
if device.Type != "usw" {
|
||||
continue
|
||||
}
|
||||
|
||||
// The USP-RPS isn't really a switch.
|
||||
if device.Model == "USPRPS" {
|
||||
continue
|
||||
}
|
||||
|
||||
devicesAvailable = append(devicesAvailable, device.MAC)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user