Fix ZFS storage reporting on TrueNAS SCALE (#718)

- Refactor collector to support mocking
- Fix ZFS detection to support 'fuse.zfs' and case-insensitivity
- Add regression tests for ZFS dataset deduplication
This commit is contained in:
courtmanr@gmail.com 2025-11-22 23:53:39 +00:00
parent a5fbe52a59
commit 85461618fd
3 changed files with 157 additions and 9 deletions

3
go.mod
View file

@ -18,6 +18,7 @@ require (
github.com/rs/zerolog v1.34.0
github.com/shirou/gopsutil/v4 v4.25.9
github.com/spf13/cobra v1.9.1
github.com/stretchr/testify v1.11.1
golang.org/x/crypto v0.45.0
golang.org/x/oauth2 v0.31.0
golang.org/x/sys v0.38.0
@ -33,6 +34,7 @@ require (
github.com/containerd/errdefs v1.0.0 // indirect
github.com/containerd/errdefs/pkg v0.3.0 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/docker/go-connections v0.6.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
@ -55,6 +57,7 @@ require (
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
github.com/prometheus/client_model v0.6.2 // indirect
github.com/prometheus/common v0.66.1 // indirect