Files
cloud-services/pkg/health/goroutines_test.go

20 lines
397 B
Go

package health_test
import (
"context"
"testing"
"fiskerinc.com/modules/health"
"fiskerinc.com/modules/testhelper"
)
func TestGoRoutinesCheck(t *testing.T) {
check := health.NewGoRoutinesCheck(100)
err := check(context.Background())
testhelper.NoError(t, "no error", err)
check = health.NewGoRoutinesCheck(0)
err = check(context.Background())
testhelper.Error(t, "has error", err)
}