Add new test 'TestHostGuid'
For issue: https://github.com/shirou/gopsutil/issues/322
This commit is contained in:
parent
d371ba1293
commit
2287b035c8
|
@ -91,3 +91,15 @@ func TestUserStat_String(t *testing.T) {
|
|||
t.Errorf("UserStat string is invalid: %v", v)
|
||||
}
|
||||
}
|
||||
|
||||
func TestHostGuid(t *testing.T) {
|
||||
hi, err := host.Info()
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
if hi.HostID == "" {
|
||||
t.Error("Host id is empty")
|
||||
} else {
|
||||
t.Logf("Host id value: %v", hi.HostID)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue