Commit Graph

8 Commits

Author SHA1 Message Date
939f795d37 Autocorrect PDK validation warnings 2019-05-09 23:41:09 +01:00
3a4c1c85ad Add entropy_repo type/provider, with tests and docs 2016-10-16 00:40:35 +01:00
5e5d056025 Remove required attribute validation
Previously, the entropy types would require that either package, tag, or repo
were provided, since that makes sense for the entropy files. Having a resource
that could not provide any of these would leave a malformed entry in the files.

I've had to remove that due to a deficiency in Puppet that's taken a long time
to track down. While the validation works fine for resources specified in
manifests, it breaks when parsing the records back in. Here's why:

- The provider instances method is called to retrieve a list of all entries
  in the entropy files. This correctly parses the name and properties into the
  provider instance object
- Puppet's type.rb enumerates through each of these, and tries to create a new
  Type insance using just the name and provider parameters from the provider
  instance. It then intends to iterate through the properties and add them one
  at a time.
  0c2157974a/lib/puppet/type.rb (L1180)
- The problem is that the top-level validation function is called when the
  object is first created, and at this time, none of the properties have been
  set, so the required properties have not been set and validation fails.

The top-level validation block cannot mandate a property be set, only other
types of condition.
2016-10-13 16:52:29 +01:00
0e774c77d5 Improve category/package regex, validation and add spec tests 2016-10-13 16:51:22 +01:00
336d8f355a Add spec tests for entropy_keywords 2016-10-13 00:48:20 +01:00
9b9e1281f3 Add provider spec tests for common package types, and tidy up test locations 2016-10-12 23:13:05 +01:00
60329c3dec WIP add provider flush tests 2016-10-12 16:19:05 +01:00
170787c7ad Add provider parser tests for the common package types 2016-10-12 13:18:55 +01:00