[MAGNOLIA-7804] Make system properties and environment variables injectable Created: 18/May/20  Updated: 24/Jun/20  Resolved: 05/Jun/20

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: None
Fix Version/s: 6.2.2

Type: Improvement Priority: Neutral
Reporter: Michael Duerig Assignee: Michael Duerig
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
split from MAGNOLIA-7781 Follow-up - Improve profile and magno... Closed
documentation
to be documented by MAGNOLIA-7821 DOC: Environment variable for profile... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Epic Link: Product improvements for Cloud project features
Sprint: TE 3
Story Points: 2

 Description   

Code that relies on system properties or environment variables can be hard to test (See e.g. info.magnolia.init.DefaultMagnoliaPropertiesResolver). To simplify such test setups I suggest that we introduce a component providing the values of system properties and environment variables to its users. While the default implementation just relays back to System.getenv() and System.getProperty(), test could inject their own implementations.


Generated at Mon Feb 12 04:26:59 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.