mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-12 04:30:04 +00:00
21 lines
431 B
Go
21 lines
431 B
Go
|
package prometheus
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/prysmaticlabs/prysm/shared/testutil"
|
||
|
logTest "github.com/sirupsen/logrus/hooks/test"
|
||
|
)
|
||
|
|
||
|
func TestLifecycle(t *testing.T) {
|
||
|
hook := logTest.NewGlobal()
|
||
|
prometheusService := NewPrometheusService(":2112")
|
||
|
|
||
|
prometheusService.Start()
|
||
|
|
||
|
testutil.AssertLogsContain(t, hook, "Starting service")
|
||
|
|
||
|
prometheusService.Stop()
|
||
|
testutil.AssertLogsContain(t, hook, "Stopping service")
|
||
|
}
|