mirror of
https://github.com/grafana/grafana.git
synced 2025-07-31 05:02:35 +08:00
feat: pass gcom sso_api_token to repo created from install command (#98973)
* feat: pass gcom sso_api_token to repo created from install command * fix * fix: extract gcom section to a func * Update pkg/cmd/grafana-cli/utils/command_line.go Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com> * fix: only set gcom token when the request is to GCOM --------- Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>
This commit is contained in:
@ -106,7 +106,8 @@ func TestValidatePluginRepoConfig(t *testing.T) {
|
||||
t.Skip("skipping integration test")
|
||||
}
|
||||
grafDir, cfgPath := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
|
||||
GrafanaComAPIURL: "https://grafana-dev.com",
|
||||
GrafanaComAPIURL: "https://grafana-dev.com",
|
||||
GrafanaComSSOAPIToken: "token3",
|
||||
})
|
||||
|
||||
c, err := commandstest.NewCliContext(map[string]string{
|
||||
@ -116,6 +117,9 @@ func TestValidatePluginRepoConfig(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
repoURL := c.PluginRepoURL()
|
||||
require.Equal(t, "https://grafana-dev.com/plugins", repoURL)
|
||||
|
||||
token := c.GcomToken()
|
||||
require.Equal(t, "token3", token)
|
||||
})
|
||||
|
||||
t.Run("Should use config overrides parameter if it is set alongside config parameter", func(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user