|
|
|
@ -1303,25 +1303,21 @@ func TestLoader_HideAngularDeprecation(t *testing.T) { |
|
|
|
|
cfg *config.Cfg |
|
|
|
|
expHideAngularDeprecation bool |
|
|
|
|
}{ |
|
|
|
|
{name: `without "hide_angular_deprecation" setting`, cfg: &config.Cfg{ |
|
|
|
|
AngularSupportEnabled: true, |
|
|
|
|
PluginSettings: setting.PluginSettings{}, |
|
|
|
|
Features: featuremgmt.WithFeatures(), |
|
|
|
|
}}, |
|
|
|
|
{name: `with "hide_angular_deprecation" = true`, cfg: &config.Cfg{ |
|
|
|
|
AngularSupportEnabled: true, |
|
|
|
|
PluginSettings: setting.PluginSettings{ |
|
|
|
|
"plugin-id": map[string]string{"hide_angular_deprecation": "true"}, |
|
|
|
|
}, |
|
|
|
|
Features: featuremgmt.WithFeatures(), |
|
|
|
|
}}, |
|
|
|
|
{name: `with "hide_angular_deprecation" = false`, cfg: &config.Cfg{ |
|
|
|
|
AngularSupportEnabled: true, |
|
|
|
|
PluginSettings: setting.PluginSettings{ |
|
|
|
|
"plugin-id": map[string]string{"hide_angular_deprecation": "false"}, |
|
|
|
|
}, |
|
|
|
|
Features: featuremgmt.WithFeatures(), |
|
|
|
|
}}, |
|
|
|
|
{name: "with plugin id in HideAngularDeprecation list", cfg: &config.Cfg{ |
|
|
|
|
AngularSupportEnabled: true, |
|
|
|
|
HideAngularDeprecation: []string{"one-app", "two-panel", "test-datasource", "three-datasource"}, |
|
|
|
|
Features: featuremgmt.WithFeatures(), |
|
|
|
|
}, expHideAngularDeprecation: true}, |
|
|
|
|
{name: "without plugin id in HideAngularDeprecation list", cfg: &config.Cfg{ |
|
|
|
|
AngularSupportEnabled: true, |
|
|
|
|
HideAngularDeprecation: []string{"one-app", "two-panel", "three-datasource"}, |
|
|
|
|
Features: featuremgmt.WithFeatures(), |
|
|
|
|
}, expHideAngularDeprecation: false}, |
|
|
|
|
{name: "with empty HideAngularDeprecation", cfg: &config.Cfg{ |
|
|
|
|
AngularSupportEnabled: true, |
|
|
|
|
HideAngularDeprecation: nil, |
|
|
|
|
Features: featuremgmt.WithFeatures(), |
|
|
|
|
}, expHideAngularDeprecation: false}, |
|
|
|
|
} { |
|
|
|
|
t.Run(tc.name, func(t *testing.T) { |
|
|
|
|
l := newLoaderWithOpts(t, tc.cfg, loaderDepOpts{ |
|
|
|
|