This commit introduces a fairly significant refactor of the plugin code
so that it no longer implicitly depends on the host filesystem but
rather on an abstract fs.FS. This enables writing tests that mock out
the filesystem to test the discovery of devices. This commit also adds
some unit tests for both USB and path-based discovery.
This commit introduces a fairly significant refactor of the plugin code so that it no longer implicitly depends on the host filesystem but rather on an abstract fs.FS. This enables writing tests that mock out the filesystem to test the discovery of devices. This commit also adds some unit tests for both USB and path-based discovery.
Signed-off-by: Lucas Servén Marín lserven@gmail.com