mirror of
https://github.com/grafana/grafana.git
synced 2025-02-14 17:43:35 -06:00
* Remove feature flag for service accounts * Fix failing tests and remove remaining usage * Fix failing tests and remove remaining usage
21 lines
590 B
Go
21 lines
590 B
Go
package manager
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"github.com/grafana/grafana/pkg/services/serviceaccounts/tests"
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestProvideServiceAccount_DeleteServiceAccount(t *testing.T) {
|
|
t.Run("should call store function", func(t *testing.T) {
|
|
storeMock := &tests.ServiceAccountsStoreMock{Calls: tests.Calls{}}
|
|
svc := ServiceAccountsService{store: storeMock}
|
|
err := svc.DeleteServiceAccount(context.Background(), 1, 1)
|
|
require.NoError(t, err)
|
|
assert.Len(t, storeMock.Calls.DeleteServiceAccount, 1)
|
|
})
|
|
}
|