Skip to content

Patch providers for absent my.cnf #141

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

Merged
merged 3 commits into from
Jan 11, 2013
Merged

Conversation

hunner
Copy link
Contributor

@hunner hunner commented Jan 10, 2013

If the /root/.my.cnf file does not exist but is specified by the
--defaults-file argument, the mysql calls will fail. The
mysql::config class creates this file, but if the custom resources are
used without including our classes then it will still break.

This allows users to use our custom resources without having to use our
classes.

@hunner hunner closed this Jan 10, 2013
If the /root/.my.cnf file does not exist but is specified by the
`--defaults-file` argument, the mysql calls will fail. The
`mysql::config` class creates this file, but if the custom resources are
used without including our classes then it will still break.

This allows users to use our custom resources without having to use our
classes.
@hunner hunner reopened this Jan 10, 2013
@@ -14,10 +14,11 @@
)
@provider = provider_class.new(@resource)
Facter.stubs(:value).with(:root_home).returns(root_home)
File.stubs(:file?).with("#{root_home}/.my.cnf").returns(true)

Choose a reason for hiding this comment

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

There aren't any tests checking for the CONVERSE behavior (where --defaults-file wasn't being called). We should at least test that behavior.

@glarizza
Copy link

Looks good with the new tests, I'll merge this in.

glarizza pushed a commit that referenced this pull request Jan 11, 2013
Patch providers for absent my.cnf
@glarizza glarizza merged commit c302efd into puppetlabs:master Jan 11, 2013
pmcmaw pushed a commit to pmcmaw/puppetlabs-mysql that referenced this pull request Mar 3, 2021
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.

3 participants