summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/prometheus/procfs/fs_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/prometheus/procfs/fs_test.go')
-rw-r--r--vendor/github.com/prometheus/procfs/fs_test.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/vendor/github.com/prometheus/procfs/fs_test.go b/vendor/github.com/prometheus/procfs/fs_test.go
index 91f1c6c97..e492cde55 100644
--- a/vendor/github.com/prometheus/procfs/fs_test.go
+++ b/vendor/github.com/prometheus/procfs/fs_test.go
@@ -11,3 +11,16 @@ func TestNewFS(t *testing.T) {
t.Error("want NewFS to fail if mount point is not a directory")
}
}
+
+func TestFSXFSStats(t *testing.T) {
+ stats, err := FS("fixtures").XFSStats()
+ if err != nil {
+ t.Fatalf("failed to parse XFS stats: %v", err)
+ }
+
+ // Very lightweight test just to sanity check the path used
+ // to open XFS stats. Heavier tests in package xfs.
+ if want, got := uint32(92447), stats.ExtentAllocation.ExtentsAllocated; want != got {
+ t.Errorf("unexpected extents allocated:\nwant: %d\nhave: %d", want, got)
+ }
+}