move event matching tests to devout

in preparation for future uevent-watch not needing to do
event matching
This commit is contained in:
Daniel Barlow
2024-04-26 21:44:02 +01:00
parent bf0cafffed
commit 80628a3d90
3 changed files with 47 additions and 33 deletions

View File

@@ -3,13 +3,6 @@
(local subject (require :watch))
(let [params
{:matches {:devname "foo" :partname "my-usbstick"}}]
(expect= (subject.event-matches? params {}) false)
(expect= (subject.event-matches? params {:devname "bill"}) false)
(expect= (subject.event-matches? params {:devname "foo" :partname "my-usbstick"}) true)
(expect= (subject.event-matches? params {:devname "foo" :otherthing "bar" :partname "my-usbstick"}) true)
)
;; Events come from the netlink socket as an initial summary line