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

(MODULES-6528) Fix registry::value defined type #153

Conversation

Iristyle
Copy link
Contributor

@Iristyle Iristyle commented Jan 25, 2018

  • Demonstrate the bug introduced in the 2.0.0 release as part of
    48a0b07

  • Tests for dword, qword and array type values currently fail in the first
    commit given the defined type doesn't properly type the $data value to
    allow numeric values or arrays.

  • Fix the bug introduced in 48a0b07
    that did not have lenient enough typing for the $data parameter to
    the registry::value defined type.

  • This commit adds support for numerics, which are necessary for
    dword and qword. It also adds support for arrays, which are always
    an array of strings (corresponding to REG_MULTI_SZ).

@Iristyle Iristyle force-pushed the MODULES-6528-fix-registry-value-defined-type branch from 94122fc to 4f5a86e Compare January 25, 2018 23:59
 - Demonstrate the bug introduced in the 2.0.0 release as part of
   48a0b07

 - Tests for dword, qword and array type values currently fail given
   the defined type doesn't properly type the $data value to allow
   numeric values or arrays.
 - Fix the bug introduced in 48a0b07
   that did not have lenient enough typing for the $data parameter to
   the registry::value defined type.

 - This commit adds support for numerics, which are necessary for
   dword and qword. It also adds support for arrays, which are always
   an array of strings (corresponding to REG_MULTI_SZ).
@Iristyle Iristyle force-pushed the MODULES-6528-fix-registry-value-defined-type branch from 4f5a86e to e36dc74 Compare January 26, 2018 00:36
end

['dword', 'qword'].each do |type|
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests here cover all the valid types per https://github.com/puppetlabs/puppetlabs-registry#type - string, array, dword, qword, binary and expand

@@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a

## Unreleased

#### Fixed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noticed our use of header here is inconsistent... I copied the prior which was using ####, but now see most (but not all!) are using ###

@michaeltlombardi michaeltlombardi merged commit a4cf4c7 into puppetlabs:master Jan 26, 2018
@Iristyle Iristyle deleted the MODULES-6528-fix-registry-value-defined-type branch January 26, 2018 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants