b1f90fd1d2
This is a major change to the module and would be released as a new version. * Add self.instances to database and database_user for puppet resource. * Update database provider to use flush method. * Update module to conform to puppet-lint recommendations. * Cleanup some unecessary logic in mysql::db define type. * Move mysql_restart to config class. * Use class to class dependency instead of resource dependency. * Change appropriate rspec-puppet tests. * Add fixtures directory to simplify testing. * Update raketask and spec_helper to reflect fixture changes. * Update mysql_password function to support validation. * Move client installation to a separate class. * Update documentation and readme.
16 lines
712 B
Ruby
16 lines
712 B
Ruby
require 'puppet'
|
|
require 'rspec'
|
|
require 'rspec-puppet'
|
|
|
|
def param_value(subject, type, title, param)
|
|
subject.resource(type, title).send(:parameters)[param.to_sym]
|
|
end
|
|
|
|
RSpec.configure do |c|
|
|
c.module_path = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures/modules'))
|
|
# Using an empty site.pp file to avoid: https://github.com/rodjek/rspec-puppet/issues/15
|
|
c.manifest_dir = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures/manifests'))
|
|
# Use fixtures for config file mainly to support using our own hiera.yaml settings.
|
|
# Pending: https://github.com/rodjek/rspec-puppet/pull/21
|
|
# c.config = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures/puppet.conf'))
|
|
end
|