Chore: Bump grafana-azure-sdk-go to v1.12.0 and expose AzureAuthEnabled value in config (#81807)
* upgrade grafana-azure-sdk-go v1.12.0 * add AzureAuthEnabled to config
This commit is contained in:
@@ -825,6 +825,33 @@ func TestService_GetConfigMap_concurrentQueryCount(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
func TestService_GetConfigMap_azureAuthEnabled(t *testing.T) {
|
||||
t.Run("Uses the configured azureAuthEnabled", func(t *testing.T) {
|
||||
s := &Service{
|
||||
cfg: &config.Cfg{
|
||||
AzureAuthEnabled: true,
|
||||
},
|
||||
}
|
||||
require.Equal(t, map[string]string{"GFAZPL_AZURE_AUTH_ENABLED": "true"}, s.GetConfigMap(context.Background(), "", nil))
|
||||
})
|
||||
|
||||
t.Run("Doesn't set the azureAuthEnabled if it is not in the config", func(t *testing.T) {
|
||||
s := &Service{
|
||||
cfg: &config.Cfg{},
|
||||
}
|
||||
require.Equal(t, map[string]string{}, s.GetConfigMap(context.Background(), "", nil))
|
||||
})
|
||||
|
||||
t.Run("Doesn't set the azureAuthEnabled if it is false", func(t *testing.T) {
|
||||
s := &Service{
|
||||
cfg: &config.Cfg{
|
||||
AzureAuthEnabled: false,
|
||||
},
|
||||
}
|
||||
require.Equal(t, map[string]string{}, s.GetConfigMap(context.Background(), "", nil))
|
||||
})
|
||||
}
|
||||
|
||||
func TestService_GetConfigMap_azure(t *testing.T) {
|
||||
azSettings := &azsettings.AzureSettings{
|
||||
Cloud: azsettings.AzurePublic,
|
||||
|
||||
Reference in New Issue
Block a user