//nolint:typecheck package devices import ( . "github.com/onsi/ginkgo/v2" //nolint:revive . "github.com/onsi/gomega" //nolint:revive ) var _ = Describe("Device Properties and Attributes Matcher", func() { It("Match against SUBSYSTEM property", func() { m := NewMatcher().WithRules(NewPropRule("SUBSYSTEM", "usb")) match := m.MatchDevice(testDevice) Expect(match).To(BeTrue()) }) It("Match against idVendor and idProduct attributes", func() { m := NewMatcher().WithRules(NewAttrRule("idProduct", "0002"), NewAttrRule("idVendor", "1d6b")) match := m.MatchDevice(testDevice) Expect(match).To(BeTrue()) }) It("Match against DEVNAME property", func() { m := NewMatcher().WithRules(NewPropRule("DEVNAME", "bus/usb/001/001")) match := m.MatchDevice(testDevice) Expect(match).To(BeTrue()) }) })