Chore: Making the plugin install commands respect the config parameter (#86578)
Currently the grafana cli plugin commands are not reacting to the --config parameter. This PR make it possible to use config to define the plugin endpoints via config as an alternative to providing the --repo flag.
This commit is contained in:
@@ -376,6 +376,13 @@ func CreateGrafDir(t *testing.T, opts ...GrafanaOpts) (string, string) {
|
||||
_, err = unifiedAlertingSection.NewKey("min_interval", o.NGAlertSchedulerBaseInterval.String())
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
if o.GrafanaComAPIURL != "" {
|
||||
grafanaComSection, err := getOrCreateSection("grafana_com")
|
||||
require.NoError(t, err)
|
||||
_, err = grafanaComSection.NewKey("api_url", o.GrafanaComAPIURL)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
}
|
||||
logSection, err := getOrCreateSection("database")
|
||||
require.NoError(t, err)
|
||||
@@ -422,6 +429,7 @@ type GrafanaOpts struct {
|
||||
GRPCServerAddress string
|
||||
QueryRetries int64
|
||||
APIServerStorageType string
|
||||
GrafanaComAPIURL string
|
||||
}
|
||||
|
||||
func CreateUser(t *testing.T, store db.DB, cfg *setting.Cfg, cmd user.CreateUserCommand) *user.User {
|
||||
|
||||
Reference in New Issue
Block a user