Skip to content

Create test resource with local state #226

Open
@DavidS

Description

@DavidS

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions