add Inode test and go fmt

This commit is contained in:
WAKAYAMA Shirou 2014-08-26 22:17:35 +09:00
parent c7ffdfa3b5
commit e1e9f80bf0
3 changed files with 22 additions and 18 deletions

View File

@ -53,8 +53,12 @@ func TestDiskUsageStat_String(t *testing.T) {
Free: 2000,
Used: 3000,
UsedPercent: 50.1,
InodesTotal: 4000,
InodesUsed: 5000,
InodesFree: 6000,
InodesUsedPercent: 49.1,
}
e := `{"path":"/","total":1000,"free":2000,"used":3000,"usedPercent":50.1}`
e := `{"path":"/","total":1000,"free":2000,"used":3000,"usedPercent":50.1,"inodesTotal":4000,"inodesUsed":5000,"inodesFree":6000,"inodesUsedPercent":49.1}`
if e != fmt.Sprintf("%v", v) {
t.Errorf("DiskUsageStat string is invalid: %v", v)
}