Skip to content

[DI test] provide a way to set config #5645

@ndr-brt

Description

@ndr-brt

Feature Request

Currently a lot of tests that are using DependencyInjectionExtension are relying on the spy functionality of mockito to provide the configuration. This is leading to fragile tests, especially with the introduction of the injectable settings/configuration because the test often needs to know how the getConfig()/getConfig(String path) methods will be called by the injectors.

A proposal would be to provide an extension of the DefaultServiceExtensionContext that provides a way to set the Config object, that could be called right before the extension instantiation, this way the config values will be injected correctly as done in the production code

Which Areas Would Be Affected?

e.g., DPF, CI, build, transfer, etc.

Why Is the Feature Desired?

Are there any requirements?

Who will sponsor this feature?

Please @-mention the committer that will sponsor your feature.

Solution Proposal

If possible, provide a (brief!) solution proposal.

Metadata

Metadata

Assignees

Labels

feature_requestNew feature request, awaiting triagetriageall new issues awaiting classification

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions