faas/watchdog/metrics/metrics_test.go
Alex Ellis 634ec22c8d Add RED metrics
- this PR adds metrics via Prometheus for instrumentation and
to move towards using HPAv2 / custom metrics in Kubernetes.

Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2019-04-04 09:05:17 +01:00

22 lines
315 B
Go

package metrics
import (
"testing"
"time"
)
func Test_RegisterServer(t *testing.T) {
metricsPort := 31111
metricsServer := MetricsServer{}
metricsServer.Register(metricsPort)
cancel := make(chan bool)
go metricsServer.Serve(cancel)
time.AfterFunc(time.Millisecond*500, func() {
cancel <- true
})
}