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-3035) Manage configuration settings #17

Merged

Conversation

ferventcoder
Copy link

@ferventcoder ferventcoder commented May 18, 2016

Requires #1 to be merged first.

Provide the ability to manage config settings with a custom type and
provider. This allows a config setting to be ensurable, and also
allows for a config settings to be manageable in the same converge
that Chocolatey is installed during.

Things to accomplish:

  • Initial code
  • Specs
  • Documentation
  • Reference tests
  • insync? when the name includes Password

@ferventcoder ferventcoder force-pushed the ticket/master/MODULES-3035-config branch 2 times, most recently from c8b0fcb to 6dfb7a3 Compare May 20, 2016 22:38
@ferventcoder ferventcoder force-pushed the ticket/master/MODULES-3035-config branch from 6dfb7a3 to 1941336 Compare June 16, 2016 20:58
# may not be a bad idea entirely, as choco would just put back the default values automatically
# that way.
if @property_flush[:ensure] == :absent && choco_version < Gem::Version.new(CONFIG_MINIMUM_SUPPORTED_CHOCO_VERSION_UNSET)
#todo use xml writing instead
Copy link
Author

Choose a reason for hiding this comment

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

One of the things left to do.

@ferventcoder
Copy link
Author

@puppetlabs/windows this is ready to start reviewing.

@ferventcoder ferventcoder force-pushed the ticket/master/MODULES-3035-config branch from ae05bc7 to 661fc36 Compare June 21, 2016 22:15
if (self[:title] =~ /password/i)
# If name contains password, it is
# always in sync if there is a value
return (is.nil? || is.empty?) == (should.nil? || should.empty?)
Copy link
Author

Choose a reason for hiding this comment

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

Not really sure how to test this in specs. I have a pretty good idea of testing it in reference tests though.

@ferventcoder ferventcoder force-pushed the ticket/master/MODULES-3035-config branch 4 times, most recently from 22f3d71 to 163d9a2 Compare June 29, 2016 03:28
Provide the ability to manage config settings with a custom type and
provider. This allows a config setting to be ensurable, and also
allows for a config settings to be manageable in the same converge
that Chocolatey is installed.

The minimum version of Chocolatey has been set at 0.9.10 as that
is where unsetting configuration values was implemented.

When it comes to config values that contain passwords, those are
not ensurable, but the insync? will check to see if it has a value
or not and respond appropriately.
For acceptance/reference tests, ensure that Chocolatey is
installed from choco-pipeline-tests instead of temp-build-tools.
@ferventcoder ferventcoder force-pushed the ticket/master/MODULES-3035-config branch from 163d9a2 to c90f3fd Compare June 29, 2016 04:12
@ferventcoder ferventcoder changed the title {WIP}(MODULES-3035) Manage configuration settings (MODULES-3035) Manage configuration settings Jun 29, 2016
@glennsarti
Copy link

Assuming adhoc build is ok, 👍 for merge

@ferventcoder ferventcoder force-pushed the ticket/master/MODULES-3035-config branch from c90f3fd to 410e5c5 Compare June 29, 2016 04:41
Add reference/acceptance tests for chocolateyconfig. These
test the following:

- adding a new config item
- adding a value to an empty existing config item
- changing a config value
- seeing how changing a config value with password does
  not change the value unless going from empty to a value
- removing a value from a config setting
- removing a value from a config setting named with password
- attempt to apply a bad manifest
- attempt to set ensure=>present with no value
@ferventcoder ferventcoder force-pushed the ticket/master/MODULES-3035-config branch from 410e5c5 to 7631c06 Compare June 29, 2016 12:57
@jpogran jpogran merged commit 00f9044 into puppetlabs:master Jun 29, 2016
@ferventcoder ferventcoder deleted the ticket/master/MODULES-3035-config branch June 29, 2016 14:29
ThoughtCrhyme pushed a commit to ThoughtCrhyme/puppetlabs-chocolatey that referenced this pull request Mar 20, 2017
…refactor_client

(QA-2035) Refactor Client
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.

4 participants