Skip to content

Commit 7556b6e

Browse files
committed
pkg/osutil: run TestDiskUsage only on Linux
The test uses some hardcoded numbers for disk usage, it's hard to get it working on all possible OSes.
1 parent 82c9c08 commit 7556b6e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/osutil/osutil_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"fmt"
99
"os"
1010
"path/filepath"
11+
"runtime"
1112
"strings"
1213
"testing"
1314
"time"
@@ -153,6 +154,11 @@ func TestReadWriteJSON(t *testing.T) {
153154
}
154155

155156
func TestDiskUsage(t *testing.T) {
157+
if runtime.GOOS != "linux" {
158+
// The test uses some hardcoded numbers for disk usage,
159+
// it's hard to get it working on all possible OSes.
160+
t.Skip("skipping on non-linux")
161+
}
156162
dir := t.TempDir()
157163
var currentUsage uint64
158164
expectUsage := func(minIncrease, maxIncrease uint64) {

0 commit comments

Comments
 (0)