Files
ProjectOctopus/agent-go/status/Disk_test.go
2023-12-20 15:50:08 +08:00

22 lines
321 B
Go

package status
import (
"encoding/json"
"fmt"
"testing"
)
func TestGetDiskStatus(t *testing.T) {
ds := GetDiskStatus()
fmt.Printf("Total: %v, Used: %v\n", ds.Total, ds.Used)
marshalIndent, err := json.MarshalIndent(ds, "", " ")
if err != nil {
fmt.Printf("error")
}
fmt.Println(string(marshalIndent))
}