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:
Joshua Spence
2023-02-28 20:20:54 +11:00
parent 8b28a7d42e
commit 592bc6267f
4 changed files with 14 additions and 9 deletions

View File

@@ -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)
}
}