initial commit
This commit is contained in:
16
internal/collector/collector_test.go
Normal file
16
internal/collector/collector_test.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package collector
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestGetConnections(t *testing.T) {
|
||||
// integration test to verify /proc parsing works
|
||||
conns, err := GetConnections()
|
||||
if err != nil {
|
||||
t.Fatalf("GetConnections() returned an error: %v", err)
|
||||
}
|
||||
|
||||
// connections are dynamic, so just verify function succeeded
|
||||
t.Logf("Successfully got %d connections", len(conns))
|
||||
}
|
||||
Reference in New Issue
Block a user