Skip to content

Commit

Permalink
util(disk): unit test
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <[email protected]>
  • Loading branch information
crazy-max committed Jan 7, 2025
1 parent 0cf4f65 commit 5c75264
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions util/disk/disk_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package disk

import (
"testing"

"github.com/stretchr/testify/require"
)

func TestGetDiskStat(t *testing.T) {
diskStat, err := GetDiskStat("/")
require.NoError(t, err)
require.Greater(t, diskStat.Total, int64(0))
require.GreaterOrEqual(t, diskStat.Free, int64(0))
require.GreaterOrEqual(t, diskStat.Available, int64(0))
}

0 comments on commit 5c75264

Please sign in to comment.