OpenDevicePartnership / OpenDevicePartnership/patina
[Feature]: Improve ParamFunction `Param` mock-ability
@Javagedes is already working on this.
Since Oct 21, 2025.
- Dominant language
- Rust
- Stars
- 544
- Forks
- 54
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 30
Description
Feature Overview
Multiple Param implementation's mock functions allow an easy way to pass in data to a component's entry point, however many of these types (Such as Commands and ConfigMut) manipulate the data. We currently have no way to validate these changes post-component execution because these variables are consumed in the execution of the component.
Improvements should be made to be able to inspect the data after component execution to be able to do more comprehensive testing.
Solution Overview
Pass a reference to the data that will be manipulated by the Parameters, rather than consuming the instance. This allows us to still have access to the manipulated data after the component executes.
Alternatives Considered
Possibly do compile time configurations to change the inner data type when running tests.
Urgency
Low
Are you going to implement the feature request?
I will implement the feature
Do you need maintainer feedback?
No maintainer feedback needed
Anything else?
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.