Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create test resource with local state #226

Open
DavidS opened this issue Sep 24, 2019 · 0 comments
Open

Create test resource with local state #226

DavidS opened this issue Sep 24, 2019 · 0 comments

Comments

@DavidS
Copy link
Contributor

DavidS commented Sep 24, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant