add network collector

This commit is contained in:
Martin Lindhe
2016-09-27 16:17:03 +02:00
parent 141b28a656
commit 6a5ae712d6
3 changed files with 260 additions and 1 deletions

15
collector/net_test.go Normal file
View File

@@ -0,0 +1,15 @@
package collector
import "testing"
func TestNetworkToInstanceName(t *testing.T) {
data := map[string]string{
"Intel[R] Dual Band Wireless-AC 8260": "Intel_R__Dual_Band_Wireless_AC_8260",
}
for in, out := range data {
got := mangleNetworkName(in)
if got != out {
t.Error("expected", out, "got", got)
}
}
}