mirror of
https://github.com/shirou/gopsutil.git
synced 2025-04-26 13:48:59 +08:00
18 lines
232 B
Go
18 lines
232 B
Go
package main
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestHostInfo(t *testing.T) {
|
|
host := NewHost()
|
|
|
|
v, err := host.HostInfo()
|
|
if err != nil {
|
|
t.Errorf("error %v", err)
|
|
}
|
|
if v.Uptime == 0 {
|
|
t.Errorf("Could not get uptime %v", v)
|
|
}
|
|
}
|