Add new test 'TestHostGuid'

For issue: https://github.com/shirou/gopsutil/issues/322
pull/324/head
Alexey Galkin 8 years ago committed by GitHub
parent d371ba1293
commit 2287b035c8

@ -91,3 +91,15 @@ func TestUserStat_String(t *testing.T) {
t.Errorf("UserStat string is invalid: %v", v) 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…
Cancel
Save