Commit graph

123 commits

Author SHA1 Message Date
Ashley Penney
250932245f How embarrassing, the tests were broken on Debian. 2013-11-12 19:39:08 -05:00
Ashley Penney
29952116ca Merge pull request #367 from w32-blaster/master
Method for loading .my.cnf file is changed from "defaults-file" to "defaults-extra-file" (mysql option)
2013-11-12 13:16:11 -08:00
Tamas Szasz
4ac8879734 Fixed missing parent for global mysql class
Added "require" to the global mysql.rb file like in the other provider files.

defaults-file changed to defaults-extra-file in all the database_* (old) providers, the same as in the mysql_* providers.

Changed defaults-file to defaults-extra-file in all test files
2013-11-12 21:32:41 +01:00
Mason Malone
e947eaf6ee Adding tests for mysql::server::providers 2013-11-11 10:56:55 -05:00
Marc Huffnagle
7ea41249e2 Fix raise_error deprecation warning 2013-10-31 12:42:42 -04:00
Ashley Penney
d271ab5f76 Fix an issue with lowercase privileges.
This fixes the case where a user passes in lowercase privileges and
we incorrectly assume this means a change and reapply them.
2013-10-28 12:44:48 -04:00
Ashley Penney
1dae474146 Add a moere complex test case for mysql_grant. 2013-10-10 15:07:47 -07:00
Ashley Penney
ce266fa893 Add in the @host users. 2013-10-08 10:18:14 -07:00
Ashley Penney
cc51d7ad7d Improve mysql_grant to work with IPv6.
This work attempts to improve the situation for matching IPv6
IP addresses, as the previous regex couldn't handle them properly.
2013-10-07 11:57:02 -07:00
Ashley Penney
5d17f10f93 Port of a6101dc (mysql::server::monitor fix) to 2.x. 2013-10-07 09:55:13 -04:00
Ashley Penney
1d59505425 Extend coverage to the contents of /etc/my.cnf. 2013-10-04 14:47:31 -04:00
Ashley Penney
4a48d639f2 Add testing for mysql::server::root_password. 2013-10-04 13:22:21 -04:00
Ashley Penney
f8af684fe0 Merge pull request #276 from apenney/mysql_grant_fixes
Improvements to mysql_grant.
2013-10-02 09:54:09 -07:00
Nate Riffe
602ec1354f Adjust the test to the new reality 2013-09-29 18:44:49 -05:00
Justin Burnham
1b4a486bf9 Fixes issue #274 by using recursive hash merge. 2013-09-25 10:38:08 -07:00
Ashley Penney
46fe1ea512 Remove mysql::globals.
This turned out to be a fairly bad idea.  It begun as a way to try
and mirror what happens in the postgresql module for consistency
but instead made things complex.

I've changed it to have the override_options in mysql::server which
leads much more naturally out of the design and shape of MySQL.
2013-09-24 18:04:29 -04:00
Ashley Penney
003d5b3c6a Improvements to mysql_grant.
Ensure that table and user are required properties, as well as remove
the optional table handling in the provider and enforce it.
2013-09-24 15:37:11 -04:00
Ashley Penney
ce893b5115 Fix spec tests on ruby 1.8. 2013-09-13 13:42:32 -04:00
Ashley Penney
803034e880 Rewrite spec tests to account for changes. 2013-09-13 13:14:48 -04:00
Ashley Penney
e3843ceb6f Refactor to use mysql::globals.
This initial round of work focuses on adding the concept of
mysql::globals to the module.  This is a shared place to provide all the
data the module needs, and then clients, servers, and providers can all
rely on this information to set things up.

This is being primarily used at first to allow a default_options hash
that contains all the previous parameters and takes a overrides_options
that allows you to then further customize any of the options in my.cnf.
2013-09-09 11:34:39 -04:00
Ashley Penney
2abccab4d9 Refactor and rename database_grant to mysql_grant.
This provider has undergone the largest set of changes and currently
just accepts a full SQL grant string as the name and then applies it,
making things easier for DBAs and removes the awkward attempts at
modelling grants into Puppet.
2013-09-03 17:24:21 -04:00
Ashley Penney
351c722fbd Add rspec-system test for mysql_user. 2013-08-28 18:11:21 -04:00
Ashley Penney
88eea1708e Add simplecov support in order to generate test coverage. 2013-08-28 18:11:21 -04:00
Ashley Penney
596d005a98 Rework tests for mysql_password to extend coverage. 2013-08-28 18:11:21 -04:00
Ashley Penney
369c83126b Use new provider names in manifests.
Modify manifests and tests to handle the renamed providers.
2013-08-28 18:11:21 -04:00
Ashley Penney
16770faa29 Rename and refactor database_user to mysql_user.
This work adds max_connections_per_hour, max_queries_per_hour, and
max_updates_per_hour support to the provider and extends self.instances to add
in the new parameters when checking existing users.  It also adds
self.prefetch in order to speed up Puppet runs.

Provider is also switched to using mk_resource_methods to generate
all the resource readers, and exists? and other methods now use the
property_hash where appropriate.

Tests rewritten to handle changes and extend code coverage.
2013-08-28 18:11:21 -04:00
Ashley Penney
7d4f9fc685 Rename and refactor database to mysql_database.
Add collate as a new managable parameter, and extend self.instances to
add in all parameters when checking existing databases.  It also adds
self.prefetch in order to speed up Puppet runs.

Provider is also switched to using mk_resource_methods to generate
all the resource readers, and exists? and other methods now use the
property_hash where appropriate.

Tests rewritten to handle changes and extend code coverage.
2013-08-28 18:11:21 -04:00
Trey Dockendorf
627699fc49 Add option to mysql::backup to set the backup script to perform a mysqldump on each database to its own file 2013-08-27 15:15:29 -05:00
Ashley Penney
40db3e801d Merge pull request #244 from willametteuniversity/master
Added support to back up specified databases only with 'mysqlbackup'
2013-08-27 09:26:25 -07:00
Casey Feskens
359d88175c Added support to back up specified databases only with 'mysqlbackup'
parameter.  Each database is backed up separately to a named file.
2013-08-13 14:44:41 -07:00
Hunter Haugen
82c4b81ba3 Add environment variable for .my.cnf and specs 2013-08-13 13:08:39 -07:00
Ashley Penney
7c7195ba33 Refactor MySQL bindings and client packages.
The current MySQL module is hard to modify, test, and drop in
replacement components to.  This work starts out by refactoring
the bindings support in MySQL to a completely seperate bindings
class in order to reduce the amount of parameters in the main
class for a feature that is infrequently used.

In addition to this start the movement of client configuration
and packages to the mysql::client::* namespace.
2013-07-19 18:39:55 -04:00
Vincent Janelle
afb8561372 Fixing puppetlabs-mysql PR 174 spec tests 2013-07-16 15:01:58 -07:00
Ashley Penney
cc58668d19 Various fixes suggested by RubyMine. (style for the most part). 2013-07-11 19:41:42 -04:00
Ashley Penney
1bd970d8e5 Merge pull request #215 from mbakke/max_connections
Support max_user_connections in database_user
2013-07-10 07:40:23 -07:00
Marius Bakke
f3b3a7e39f fix database_user tests after changing creation method 2013-07-10 10:23:02 +02:00
Ashley Penney
588af2a89d Merge pull request #218 from hunner/rspec_system_serverspec
Add rspec-system / serverspec tests
2013-07-09 16:15:17 -07:00
Ashley Penney
926e94a4cb Merge pull request #170 from omalashenko/master
Harden mysqlbackup.sh script
2013-07-09 16:06:55 -07:00
Marius Bakke
5f3708ff24 add spec for max_user_connections on database_user 2013-07-08 17:49:59 +02:00
Martin Magr
e3d74a65b0 Use $root_home for .my.cnf 2013-07-08 11:49:30 +02:00
Hunter Haugen
c34bcc0f73 Add rspec-system / serverspec tests 2013-07-05 15:19:02 -07:00
Ashley Penney
4d811e4704 Add basic specs for database provider. 2013-07-05 15:04:04 -04:00
Ashley Penney
d35261dc16 Tweak spec file to account for days of rotation. 2013-07-05 12:32:19 -04:00
Daniel De Marco
e12eb0e19f add ft_min_word_len and ft_max_word_len config options 2013-07-04 21:33:53 -04:00
Oleg Malashenko
1521a2ea4f Fixed tests for mysqlbackup.sh 2013-07-05 11:27:29 +10:00
Ashley Penney
8bf03681f3 Various changes to the provider to ensure commands are successful,
as well as improvements to the tests.
2013-07-03 16:08:48 -04:00
Ashley Penney
00130ef6c6 Add initial spec tests for database_user. 2013-07-03 13:22:48 -04:00
Ashley Penney
e961b83226 Fix spelling of privileges across the spec file. 2013-07-02 16:57:36 -04:00
Lebedev Vadim
9d69afcae7 Merge branch 'master' of https://github.com/puppetlabs/puppetlabs-mysql
Conflicts:
	manifests/config.pp
	spec/classes/mysql_config_spec.rb
2013-07-02 22:11:19 +04:00
Ashley Penney
aa5d1f070b Merge pull request #198 from mhellmic/maxconnections
add a maximum connection parameter and set the default to 1000
2013-07-02 10:43:29 -07:00