puppetlabs / puppetlabs/puppet-resource_api
Create test resource with local state
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 27
- Forks
- 42
- PR merge metrics
- No merged PRs in 30d
Description
Use Case
To facilitate education and easier testing, we need a test resource that manages some local attributes using a simple interface.
Describe the Solution You Would Like
test_resource { '/tmp/test.json#foo':
ensure => present,
data => { 'key' => 'value' }
}
would result in a file called /tmp/test.json with the following contents:
{
"foo": {
"data": {
"key": "value"
}
}
}
This can be implemented as part of the test_device module for both local and "remote" resource usage.
Additional Context
Originally filed as https://tickets.puppetlabs.com/browse/PDK-1459. See also #213 for a similar but different effort.
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.
Research direction
Start by reviewing the test_device module and the related effort in issue #213. Define the local-state resource behavior for both local and remote usage, including ensure and data handling, and verify that the requested /tmp/test.json#foo example produces the documented JSON structure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100