Plugins: Refactor plugin config into separate env var and request scoped services (#83261)
* seperate services for env + req * merge with main * fix tests * undo changes to golden file * fix linter * remove unused fields * split out new config struct * provide config * undo go mod changes * more renaming * fix tests * undo bra.toml changes * update go.work.sum * undo changes * trigger * apply PR feedback
This commit is contained in:
@@ -17,7 +17,7 @@ import (
|
||||
|
||||
func TestProvideService(t *testing.T) {
|
||||
t.Run("uses hardcoded inspector if feature flag is not present", func(t *testing.T) {
|
||||
pCfg := &config.Cfg{Features: featuremgmt.WithFeatures()}
|
||||
pCfg := &config.PluginManagementCfg{Features: featuremgmt.WithFeatures()}
|
||||
dynamic, err := angulardetectorsprovider.ProvideDynamic(
|
||||
pCfg,
|
||||
angularpatternsstore.ProvideService(kvstore.NewFakeKVStore()),
|
||||
@@ -33,7 +33,7 @@ func TestProvideService(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("uses dynamic inspector with hardcoded fallback if feature flag is present", func(t *testing.T) {
|
||||
pCfg := &config.Cfg{Features: featuremgmt.WithFeatures(
|
||||
pCfg := &config.PluginManagementCfg{Features: featuremgmt.WithFeatures(
|
||||
featuremgmt.FlagPluginsDynamicAngularDetectionPatterns,
|
||||
)}
|
||||
dynamic, err := angulardetectorsprovider.ProvideDynamic(
|
||||
|
||||
Reference in New Issue
Block a user