ProvisioningService: Change the ProvisioningService interface for easier extension (#32910)

* Made a public constructor in order to instantiate it from the service override

* Removed unused plugins.DataRequestHandler

* Added a Run and RunInitProvisioners methods that can be run from Enterprise

* Adding a mock for Run and RunInitProvisioners as well
This commit is contained in:
gamab
2021-04-21 13:41:34 +02:00
committed by GitHub
parent 63e2977837
commit a151dfaa04
4 changed files with 49 additions and 17 deletions

View File

@ -7,7 +7,6 @@ import (
"time"
dboards "github.com/grafana/grafana/pkg/dashboards"
plugifaces "github.com/grafana/grafana/pkg/plugins"
"github.com/grafana/grafana/pkg/services/provisioning/dashboards"
"github.com/grafana/grafana/pkg/setting"
"github.com/stretchr/testify/assert"
@ -93,7 +92,7 @@ func setup() *serviceTestStruct {
}
serviceTest.service = newProvisioningServiceImpl(
func(string, dboards.Store, plugifaces.DataRequestHandler) (dashboards.DashboardProvisioner, error) {
func(string, dboards.Store) (dashboards.DashboardProvisioner, error) {
return serviceTest.mock, nil
},
nil,