package status

import (
	"encoding/json"
	"fmt"
	"testing"
	"wdd.io/agent-go/utils"
)

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))

}

func TestGetDiskInfo(t *testing.T) {

	diskInfo, err := GetDiskInfo()
	if err != nil {
		t.Errorf("get disk info error ! => %v", err)
	}

	utils.BeautifulPrint(diskInfo)

}
