package health_test

import (
	"context"
	"testing"

	"github.com/fiskerinc/cloud-services/pkg/health"
	"github.com/fiskerinc/cloud-services/pkg/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)
}
