[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: |
|
||||||||||||||||
| 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. |