grafana/pkg/server/backgroundsvcs/background_services_test.go
Will Browne 4818568c65
Chore: Convert background service registry to dskit module (#64062)
* Chore: Add initial support for deployment modes

* revert CLI changes and start modules independently

* add modules to codeowners

* additional comments

* add Engine and Manager interface to fix test issues

* convert background service registry to dskit module

* remove extra context from serviceListener logger

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>

* Remove whitespace

* fix import

* undo ide changes

* only register All by default

* with registry

* add test

* add comments

* re-add debug log

* fix import

* reorganize arg

* undo kind changes

* add provide service test

* fix import

* rejig systemd calls

* update codeowners

---------

Co-authored-by: Todd Treece <todd.treece@grafana.com>
Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2023-07-06 14:45:47 +02:00

14 lines
314 B
Go

package backgroundsvcs
import (
"errors"
"testing"
"github.com/stretchr/testify/require"
)
func TestBackgroundServiceRegistry_GetServices(t *testing.T) {
s := NewBackgroundServiceRegistry(newTestService("A", nil, false), newTestService("B", errors.New("boom"), false))
require.Len(t, s.GetServices(), 2)
}