Skip to content

Commit

Permalink
Use util constant for unknown class check
Browse files Browse the repository at this point in the history
Signed-off-by: Elias Koromilas <[email protected]>
  • Loading branch information
eliaskoromilas committed Sep 23, 2022
1 parent 4819e97 commit f17c871
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/pci/pci_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"github.com/jaypipes/ghw/pkg/marshal"
"github.com/jaypipes/ghw/pkg/option"
"github.com/jaypipes/ghw/pkg/pci"
"github.com/jaypipes/ghw/pkg/util"

"github.com/jaypipes/ghw/testdata"
)
Expand Down Expand Up @@ -228,7 +229,7 @@ func TestPCIModaliasWithUpperCaseClassID(t *testing.T) {
if dev == nil {
t.Fatalf("Failed to parse valid modalias")
}
if dev.Class.Name == "unknown" {
if dev.Class.Name == util.UNKNOWN {
t.Fatalf("Failed to lookup class name")
}
}

0 comments on commit f17c871

Please sign in to comment.