Skip to content

(#11508) Only load sql_scripts on DB creation #28

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

Conversation

ccaum
Copy link
Contributor

@ccaum ccaum commented Dec 20, 2011

Previous to this commit, if the sql parameter was provided to a
declaration of the mysql::db defined type, the defined type would always
load the sql script on every catalog run. This changes the exec that
loads that sql script to be refreshonly unless the enforce_sql parameter
is set to true.

Previous to this commit, if the sql parameter was provided to a
declaration of the mysql::db defined type, the defined type would always
load the sql script on every catalog run. This changes the exec that
loads that sql script to be refreshonly unless the enforce_sql parameter
is set to true.
jeffmccune pushed a commit that referenced this pull request Dec 20, 2011
…efreshonly

(#11508) Only load sql_scripts on DB creation
@jeffmccune jeffmccune merged commit 4f02a86 into puppetlabs:master Dec 20, 2011
@jeffmccune
Copy link
Contributor

Nice test. I deleted the attribute and rake spec caught it immediately.

@jeffmccune
Copy link
Contributor

@ccaum Hey, just as a side note for tests specific to a ticket it may help to reference the ticket directly in the test. This way, if there is a regression we have a clear "paper trail" to get more information. It's already merged, but just a nicety for future reference.

That way, failures look like this:

% rake spec                        
(in /Users/jeff/vms/puppet/modules/mysql)

mysql
  should create Class[mysql]

mysql::db
  (#11508) should set load of sql script to refreshonly (FAILED - 1)

Failures:

  1) mysql::db (#11508) should set load of sql script to refreshonly
     Failure/Error: should create_resource('exec', 'test_db-import-import').with_param('refreshonly', true)
       expected that the catalogue would contain Exec['test_db-import-import'] with the parameter refreshonly set to `true`
     # ./spec/defines/mysql_db_spec.rb:14

Finished in 0.23844 seconds
2 examples, 1 failure

Failed examples:

rspec ./spec/defines/mysql_db_spec.rb:13 # mysql::db (#11508) should set load of sql script to refreshonly

pmcmaw pushed a commit to pmcmaw/puppetlabs-mysql that referenced this pull request Mar 3, 2021
(enhancement) add restart to linux task
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