[Agent] [Status] network info accomplish

This commit is contained in:
zeaslity
2023-12-21 09:58:37 +08:00
parent 14516c93fa
commit 4272296809
3 changed files with 114 additions and 30 deletions

View File

@@ -31,6 +31,16 @@ func TestGetNetworkMetric(t *testing.T) {
}
func TestGetNetworkInfo(t *testing.T) {
GetNetworkInfo()
networkInfos, err := GetNetworkInfo()
if err != nil {
t.Errorf("GetNetworkInfo error of %s", err)
}
for _, networkInfo := range networkInfos {
fmt.Println()
marshal, _ := json.MarshalIndent(networkInfo, "", " ")
fmt.Println(string(marshal))
fmt.Println()
}
}