You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gopsutil/host_test.go

26 lines
381 B
Go

package gopsutil
import (
"testing"
)
func TestHostInfo(t *testing.T) {
v, err := HostInfo()
if err != nil {
t.Errorf("error %v", err)
}
if v.Hostname == "" {
t.Errorf("Could not get hostinfo %v", v)
}
}
func TestBoot_time(t *testing.T) {
v, err := Boot_time()
if err != nil {
t.Errorf("error %v", err)
}
if v == 0 {
t.Errorf("Could not boot time %v", v)
}
}