[ Agent ] [ Status ] - refresh status part
This commit is contained in:
25
agent-go/status/Host_test.go
Normal file
25
agent-go/status/Host_test.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package status
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestGetHostInfo(t *testing.T) {
|
||||
|
||||
hostInfo := HostInfo{}
|
||||
|
||||
fmt.Printf("host info is %v\n", hostInfo)
|
||||
fmt.Printf("host info type is %T\n", hostInfo)
|
||||
fmt.Printf("host info address is %p\n", &hostInfo)
|
||||
|
||||
fmt.Println()
|
||||
|
||||
info, err := GetHostInfo()
|
||||
if err != nil {
|
||||
t.Errorf("get host info error is %v", err)
|
||||
}
|
||||
|
||||
fmt.Printf("get host info is %v\n", info)
|
||||
fmt.Printf("get host info address is %p\n", &info)
|
||||
}
|
||||
Reference in New Issue
Block a user