Rename linux collectors for build constraints.
This commit is contained in:
parent
d7ec7eac1f
commit
66e0171159
15 changed files with 0 additions and 0 deletions
|
|
@ -1,27 +0,0 @@
|
|||
package collector
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestNetStats(t *testing.T) {
|
||||
file, err := os.Open("fixtures/netstat")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
netStats, err := parseNetStats(file)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if want, got := "102471", netStats["TcpExt"]["DelayedACKs"]; want != got {
|
||||
t.Errorf("want netstat TCP DelayedACKs %s, got %s", want, got)
|
||||
}
|
||||
|
||||
if want, got := "2786264347", netStats["IpExt"]["OutOctets"]; want != got {
|
||||
t.Errorf("want netstat IP OutOctets %s, got %s", want, got)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue