Skip to content

Commit f17c871

Browse files
Use util constant for unknown class check
Signed-off-by: Elias Koromilas <elias.koromilas@gmail.com>
1 parent 4819e97 commit f17c871

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/pci/pci_linux_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import (
1717
"github.com/jaypipes/ghw/pkg/marshal"
1818
"github.com/jaypipes/ghw/pkg/option"
1919
"github.com/jaypipes/ghw/pkg/pci"
20+
"github.com/jaypipes/ghw/pkg/util"
2021

2122
"github.com/jaypipes/ghw/testdata"
2223
)
@@ -228,7 +229,7 @@ func TestPCIModaliasWithUpperCaseClassID(t *testing.T) {
228229
if dev == nil {
229230
t.Fatalf("Failed to parse valid modalias")
230231
}
231-
if dev.Class.Name == "unknown" {
232+
if dev.Class.Name == util.UNKNOWN {
232233
t.Fatalf("Failed to lookup class name")
233234
}
234235
}

0 commit comments

Comments
 (0)