host[all]: fix #114 String() issue.

This commit is contained in:
Shirou WAKAYAMA 2015-11-24 09:30:17 +09:00
parent b114432fbb
commit 0afd653fab
1 changed files with 2 additions and 1 deletions

View File

@ -46,8 +46,9 @@ func TestHostInfoStat_String(t *testing.T) {
Procs: 100, Procs: 100,
OS: "linux", OS: "linux",
Platform: "ubuntu", Platform: "ubuntu",
BootTime: 1447040000,
} }
e := `{"hostname":"test","uptime":3000,"procs":100,"os":"linux","platform":"ubuntu","platform_family":"","platform_version":"","virtualization_system":"","virtualization_role":""}` e := `{"hostname":"test","uptime":3000,"boot_time":1447040000,"procs":100,"os":"linux","platform":"ubuntu","platform_family":"","platform_version":"","virtualization_system":"","virtualization_role":""}`
if e != fmt.Sprintf("%v", v) { if e != fmt.Sprintf("%v", v) {
t.Errorf("HostInfoStat string is invalid: %v", v) t.Errorf("HostInfoStat string is invalid: %v", v)
} }