17 Commits

Author SHA1 Message Date
cef80e551b Fix test errors and deprecations 2019-05-10 22:36:04 +01:00
4a3dcd0a8a Rubocop fixes 2019-05-10 22:17:45 +01:00
6a5ec21a1e Fixup tests 2019-05-09 23:44:49 +01:00
939f795d37 Autocorrect PDK validation warnings 2019-05-09 23:41:09 +01:00
998f1716f3 Switch to PDK module layout 2019-05-09 23:39:55 +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
60d72803b1 Add basic tests for enman_repo type 2016-10-12 12:16:31 +01:00
d622d6b7dc Add tests for entropy_keywords 2016-10-12 12:07:44 +01:00
db52bda1c5 Extend spec test to all package types 2016-10-12 11:53:23 +01:00
6c94c710db Add a test suite for the entropy_mask type 2016-10-11 23:58:33 +01:00
404f09c426 Add documentation and module boilerplate 2016-10-10 23:18:58 +01:00