Add new test 'TestHostGuid'

For issue: https://github.com/shirou/gopsutil/issues/322
This commit is contained in:
Alexey Galkin 2017-03-03 16:28:49 +04:00 committed by GitHub
parent d371ba1293
commit 2287b035c8
1 changed files with 12 additions and 0 deletions

View File

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