Commit graph

319 commits

Author SHA1 Message Date
Morgan Haskel
058053b5bc Update spec_helper for more consistency 2014-08-28 17:49:18 -04:00
Nicholas Hinds
462dbf7a1c (MODULES-1287) Pass the backup credentials to 'SHOW DATABASES'
Pass the backup username and password to mysql when running SHOW DATABASES in
mysqlbackup.sh if `file_per_database` is true and `backupdatabases` is empty.
2014-08-24 15:44:47 +12:00
Ashley Penney
9cb685da47 Split out the template tests and rework both sets of tests. 2014-08-14 14:55:20 -04:00
Ashley Penney
c4e4a56a47 Fix this to be more concise and consistent.
This was a surprisingly large amount of work.
2014-08-08 16:47:45 -04:00
Ashley Penney
5b10f3e773 Clean these up to be more readable. 2014-08-08 16:47:44 -04:00
Ashley Penney
00a191f9ed Convert specs to RSpec 2.99.1 syntax with Transpec
This conversion is done by Transpec 2.3.6 with the following command:
    transpec -f -c "bundle exec rake spec"

* 69 conversions
    from: it { should ... }
      to: it { is_expected.to ... }

* 48 conversions
    from: obj.should
      to: expect(obj).to

* 34 conversions
    from: == expected
      to: eq(expected)

* 4 conversions
    from: it { should_not ... }
      to: it { is_expected.not_to ... }

* 3 conversions
    from: obj.should_not
      to: expect(obj).not_to

* 2 conversions
    from: lambda { }.should
      to: expect { }.to

* 2 conversions
    from: pending
      to: skip

For more details: https://github.com/yujinakayama/transpec#supported-conversions
2014-08-08 16:47:44 -04:00
Ashley Penney
bb205ad2f0 Remove all the deprecated code. 2014-08-08 14:13:22 -04:00
Ashley Penney
cf2ffc6821 Handle graceful failure on RHEL4 and improve the messaging. 2014-08-08 11:55:31 -04:00
Ashley Penney
138820b3b8 Don't check the variable here, we can trust mysql to work. 2014-08-07 17:53:26 -04:00
Hunter Haugen
1812fbca25 Rewrite some of the unit tests to work on more platforms.
This commit introduces puppet_facts, a gem that allows easier testing
against PE platforms.  We're using this gem to automatically parse the
metadata.json and test against appropriate versions of PE on platforms
we support.

We start by only running against centos-6-x86_64 and ubuntu 14.04 on a
regular basis but this is implemented as an ENV so it can be overwritten
by CI systems to test against all PE platforms.
2014-08-07 16:27:17 -04:00
Ashley Penney
994ac1a058 Rebuild the acceptance tests. 2014-08-07 15:52:19 -04:00
Ray Lehtiniemi
548952a6f9 Prevent ERROR 1008 in mysql_database provider
Check for database existence when dropping to prevent

  ERROR 1008 (HY000): Can't drop database 'test'; database doesn't exist

Signed-off-by: Ray Lehtiniemi <rayl@mail.com>
2014-07-23 21:41:16 -06:00
I'm on Vacation until 18th of July
70cafdc283 Merge pull request #509 from xbezdick/master
Parametrize !includedir
2014-07-23 12:38:18 +02:00
Gael Chamoulaud
7b3cdd234a Adds Support for CentOS and Scientific Linux 7
CentOS Project has adopted a new rule for versioning numbers. The major number
matches the RHEL major number, but the minor number is generated from the
release date. For example, CentOS 7.0.1406.

Uses $::operatingsystemmajrelease instead of $::operatingsystemrelease for
avoiding issue like "Comparison of String with 7 failed" for CentOS 7.

Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
2014-07-21 20:13:26 +02:00
Hunter Haugen
52d44be30f Merge pull request #536 from apenney/mysql_install
Handle changing the datadir properly.
2014-07-08 14:55:11 -07:00
Ashley Penney
5959715ff6 Rework the mysql initdb functionality.
This reworks a previously unmerged PR to clean up the code a little and
adds a test for it.
2014-07-08 12:53:20 -04:00
Jaakko
3cfbb581cc Change grant provider to ignore grants for non existing users.
In the grant provider users are fetched by querying mysql.user table. Grants
for those users are fetched using show grants for... syntax. This can lead to
errors, when some of the users in mysql.user table do not have currently
active grants.

This happens at least when MySQL is started with --skip-name-resolve option,
when there are users with the hostname part specified as a FQDN. Such users are
created by mysql_install_db. This leads to problems if mysql::account_security
is included for the node and skip-name-resolve is specified in override_options
hash for mysql::server.

Includes acceptance test for the change.
2014-06-17 13:07:56 +02:00
Jaakko
16002dfe09 Fix acceptance test for mysql::bindings.
Fix acceptance test for bindings to use correct parameter names, when
instantiating mysql::bindings class. Fix client and server dev package names
for couple of distros.
2014-06-11 18:01:16 +02:00
Ashley Penney
d884e2fc1e Merge pull request #522 from cmurphy/fix_mysql_grant_MODULES-1040
Require title of mysql_grant resource to match form user/table
2014-06-05 13:07:40 -04:00
Igor Galić
b39ebdcf74 Merge pull request #505 from larsks/bz/1093367
lowercase hostname values in qualified usernames
2014-06-05 12:17:04 +02:00
Colleen Murphy
07b661dcea Require title of mysql_grant resource to match form user/table
This addresses https://tickets.puppetlabs.com/browse/MODULES-1040.
The user parameter is required to have the form username@host. A grant
is identified in the instances method by a name of the form
username@host/table. The resource will fail to be identified as already
existing if the name given to the resource does not match this form.
2014-06-04 10:44:36 -07:00
Lars Kellogg-Stedman
0afb8f09e8 lowercase hostname values in qualified usernames
MySQL/MariaDB automatically downcase hostnames:

  MariaDB [mysql]> create user 'testuser'@'HOSTNAME';
  MariaDB [mysql]> select user,host from user where host = 'hostname';
  +----------+----------+
  | user     | host     |
  +----------+----------+
  | testuser | hostname |
  +----------+----------+

This causes problems when a mysql_user or datbase_user has an hostname
with non-lowercase characters:

  database_user { "root@HOSTNAME":
    ensure => absent,
  }

The SELECT statements used to determine if the user exists will fail
because the comparisons use "HOSTNAME" but the database has "hostname".
This patch forces the hostname part of "user@hostname" to lower case in
the custom type definitions.
2014-06-04 09:30:45 -04:00
Lukas Bezdicka
26204437ef Prametrize !includedir
Hardcoded path provided by puppet is now replaced by providing only the final directory as on
most systems includedir is provided by package and it's matter of user to provide it if he
wants to override it. This also allows disabling including at all.
2014-06-04 14:07:49 +02:00
William Van Hevelingen
669466c315 RSpec renamed be_true to be_truthy in 3.0
This commits updates the spec tests to use the renamed function.
2014-06-03 23:31:19 -07:00
Igor Galić
6769677e74 Merge pull request #510 from Aethylred/dev_libs
Install MySQL client and daemon dev libraries.
2014-06-03 06:34:43 +02:00
Ashley Penney
8f73cfcce0 Fix test so it doesn't fail on deprecation warnings. 2014-05-29 14:49:00 -04:00
Aaron Hicks
b2090194f5 Install MySQL client and daemon dev libraries. 2014-05-19 09:41:25 +12:00
Morgan Haskel
3871ca4206 Fixes to get tests running on RHEL5.
Existing EPEL addition in spec_helper_acceptance wasn't actually working, so pulled in stahnma-epel and applied that in the bindings test, since that's the only place it's actually required.
2014-05-12 12:32:20 -04:00
Morgan Haskel
d8a5043cc7 Fix the path for the hiera file. 2014-05-09 17:15:09 -04:00
Ashley Penney
b719956252 Replace the symlink with the actual file to resolve a PMT issue. 2014-05-09 16:53:12 -04:00
Ashley Penney
1999625fe2 Missed a couple of tests to gate off for unsupported platforms. 2014-05-09 16:53:11 -04:00
Ashley Penney
2bf1759f76 Fix hiera.yaml creation on PE. 2014-05-09 16:53:11 -04:00
Morgan Haskel
c57c762810 Package rename in Ubuntu 14.04. 2014-05-09 16:39:10 -04:00
Morgan Haskel
625cdf0e9f Allow the tests to run on RHEL7. 2014-05-09 15:54:08 -04:00
Morgan Haskel
bb4640d64a Change package/service for MariaDB. 2014-05-09 15:35:16 -04:00
Morgan Haskel
ad5381d67a Fix to install ruby-mysql from gem. 2014-05-09 15:11:57 -04:00
Morgan Haskel
7c16c52ef4 Try to add some checks so the test doesn't do an rm -rf / 2014-05-09 13:58:46 -04:00
Morgan Haskel
a6bacbd144 Fix backup test, install bzip2. 2014-05-09 13:05:00 -04:00
Ashley Penney
81a1a19f24 Improve this so it works on Ubuntu 14.04. 2014-05-02 19:52:05 +02:00
Ashley Penney
7f4c067350 Remove all rspec-system traces. 2014-04-24 22:05:43 +02:00
Igor Galić
aa82f83ace Merge pull request #500 from nerdlich/patch-1
User needs PROCESS privilege when doing file-per-database backup
2014-04-22 14:22:54 +02:00
nerdlich
b40865d740 Backup user needs PROCESS privilege when doing file-per-database backups
The following error occured:
mysqldump: Couldn't execute 'SELECT /*!40001 SQL_NO_CACHE */ * FROM `INNODB_BUFFER_PAGE`': Access denied; you need (at least one of) the PROCESS privilege(s) for this operation (1227)
2014-04-22 13:08:58 +02:00
Igor Galić
50612ab6ff fix spec tests, by adding osrelease facts 2014-04-22 12:38:29 +02:00
Ashley Penney
71d1f24bd9 Merge pull request #457 from igalic/independent-backup
mysqlbackup.sh should be able to find mysql
2014-04-10 13:46:19 -04:00
Pan
2834498e4d Allow use different name for db resource other than db name
When defining the mysql::db as exported resources, there are chances that the
same resource names are defined across the site, which will cause puppet agent
fail. By adding an optional dbname parameter, default to the $name, it allows the
resouce name to be defined differently, e.g. ${dbname}_${domain}.
Also updated test and docs for dbname parameter and add acceptance test for
dbname parameter feature
2014-03-15 13:38:13 -07:00
Ashley Penney
ec1cc59d03 Merge pull request #479 from igalic/better-backup-test
backup script test: Actually loop through a list
2014-03-06 14:48:04 -05:00
Robin Gloster
5c8d97f81b add test for ssl-disable 2014-03-04 14:58:37 +01:00
Igor Galić
53af16e601 backup script test: Actually loop through a list
we do this by creating more than one database to backup.
2014-03-02 13:30:30 +01:00
Ben Kero
ce6effe736 change box parameter to ensure vbox436 on centos65 type in acceptance test 2014-02-26 14:10:34 -08:00
Ben Kero
86d2051a5e change vbox version and ensure correct path 2014-02-26 14:09:02 -08:00
Ben Kero
046580323e add centos-65-x64 acceptance test yml file, slight change from 64 2014-02-26 14:04:09 -08:00
Ashley Penney
d1f4597e47 Add unsupported infrastructure for excluding OSes we can't test on. 2014-02-26 17:54:48 +00:00
Ashley Penney
e7f1e8de9b Last SLES fix, don't use the deprecated parameter name. 2014-02-26 16:39:59 +00:00
Ashley Penney
c3a3e3ae13 Further SLES fixes to tests. 2014-02-26 15:45:38 +00:00
Ashley Penney
2d1a9f981a This fixes:
* Bindings on SLES
* Makes sure we don't kill the service while testing conf file locations.
2014-02-26 14:54:54 +00:00
Ashley Penney
cbe562b5de As we're deleting /etc/my.cnf, lets not restart MySQL in the middle
of this and cause a terrible explosion.
2014-02-25 01:21:08 +00:00
Ashley Penney
6271f71aa8 Fix the case of this, ARGH. 2014-02-25 01:18:45 +00:00
Ashley Penney
6a93d67bb8 Make this work in SLES as well As RedHat. 2014-02-24 20:39:08 +00:00
Ashley Penney
820344f13a This should help tests on Oracle 6, the lack of epel was breaking the binding
tests.
2014-02-24 20:14:00 +00:00
Dan Carley
b7445ad859 [#434] Acceptance tests for mysql_database
Includes a test for the regression fixed in 30ce3e0.

NB: The `ensure => present` on the resource without any `charset` or
`collate` arguments is intentional because of issue described in #458
2014-02-20 16:57:51 +00:00
Igor Galić
d2b24e40d3 mysqlbackup.sh should be able to find mysql
anywhere. This should enable use to use mysql::server::backup
idependantly, even if mysql is preinstalled, and preinstalled in non
standard locations
2014-02-20 17:17:41 +01:00
Ashley Penney
f107531113 Fix this test for Debian. This is a total hack for now. 2014-02-18 20:33:52 -05:00
Ashley Penney
5eb6e7084d Fixes for Ubuntu/Debian. 2014-02-18 16:25:42 -05:00
Ashley Penney
30ce3e0e12 Repair this by ensuring calls to mysql include the database name.
A prior commit accidently broke this, meaning that mysql_database
was querying the mysql defaults instead of each individual database
when trying to determine the current collate settings.
2014-02-18 14:38:21 -05:00
Ashley Penney
27a70f5b52 Update nodesets. 2014-02-12 19:30:51 -05:00
Ashley Penney
a38e37546a Fix this so it installs PE appropriately. 2014-02-12 19:27:24 -05:00
Igor Galić
12ef27bc72 Merge pull request #445 from Phil0xF7/fix_multiple_rpm_install
Add check for puppet rpm before trying to install
2014-02-12 11:03:16 +01:00
Phil Pham
e1eed1c3eb update to install package using yum instead of rpm 2014-02-11 14:51:56 -08:00
Ashley Penney
eee60088dd (maint) Fix the specs due to changes to backup. 2014-02-11 17:10:35 -05:00
Ashley Penney
aefbf567c5 Merge pull request #443 from igalic/fix-failing-backup-spec
Fix failing backup spec test
2014-02-10 17:07:20 -05:00
Phillip Pham
92046f6a35 Add check for puppet rpm before trying to install
This fixes an issue where subsequent tests will fail when the RS_PROVISION=no and RS_DESTROY=no flag is set for centos. The error is caused by attempting to install the puppet rpm on a machine that already has the puppet rpm installed.
2014-02-07 16:32:57 -08:00
Igor Galić
51b09b7bc8 Fix failing backup spec tests
This partially reverts 7224f12c25
since after #416 the warnings are actually fixed at the source
2014-02-06 17:21:49 +01:00
Igor Galić
63e0da0b71 option to specify a script that runs after backups
This script could be used to sync backups to a central server, or just
to create a file to let external scripts know that backups are
(sucessfully) done and can be picked up.

The postscript option (defaults to false) and can be either a string or
an array of strings. These strings will be directly put into the
mysqlbackup.sh and as such can either be shell commands, or externally
managed files.
2014-02-06 16:44:07 +01:00
John Bond
10f346eaca Add logic to ignore mysql.events 2014-01-30 12:31:21 +01:00
Igor Galić
c747ea7ab5 Merge pull request #422 from stevesaliman/master
fixed a quoting problem with the mysql_database provider
2014-01-25 03:50:23 -08:00
Ashley Penney
3f9f0f632f Merge pull request #428 from radford/mysql-equates-dash-and-underscore
mysql_deepmerge should treat underscore and dash equivalently, as mysql does
2014-01-24 12:16:50 -08:00
Steve Saliman
80b97d295d Fixed a couple of failing tests 2014-01-24 13:06:34 -07:00
Jim Radford
16baff686c mysql_deepmerge should treat underscore and dash equivalently, as mysql does 2014-01-23 22:41:58 -08:00
Jim Radford
136b1aa646 Allow options with values of false to override things that mysql default to true
instead of being elided, leaving the default.
2014-01-23 16:53:57 -08:00
Dejan Golja
4f12b0c7f9 Add system test to cover procedure creation scenario 2014-01-20 23:56:26 +11:00
Ashley Penney
8c64e812d9 Minor fix to beaker tests. 2013-12-19 19:35:20 -05:00
Ashley Penney
c081327b1f Merge pull request #397 from srinathman/feature-create-db-if-exists
Added [if not exists] to [create database] clause.
2013-12-19 16:12:16 -08:00
Igor Galić
d5fd46de59 Merge pull request #400 from duritong/fix_backupuser_dependency
Fix backupuser dependency
2013-12-18 22:13:27 -08:00
Guillaume Coré
dae8018520 Support multiple lines of the same option
Some MySQL options need to be passed several times. For example :

  http://dev.mysql.com/doc/refman/5.5/en/replication-options-slave.html#option_mysqld_replicate-do-db

  This is currently impossible with the override_options. This patch allows to
  pass array as value. Example :

    override_options => {
      'client' => {
        'password' => 'xxx',
      },
      'mysqld' => {
        'bind_address'    => '0.0.0.0',
        'replicate-do-db' => ['base1', 'base2', 'base3'],
      },
    }

  Which will be evaluated into :

    [client]
    password = xxx

    [mysqld]
    bind_address = 0.0.0.0
    replicate-do-db = base1
    replicate-do-db = base2
    replicate-do-db = base3
2013-12-18 16:00:12 -05:00
Ashley Penney
c32ae645e0 Apparently we were restarting no matter what the parameter said,
awkward.
2013-12-18 15:12:04 -05:00
Ashley Penney
ce77d067ef Fix a few tests. 2013-12-18 14:13:00 -05:00
mh
765afe4f61 Fix #321 - root_user should be setup before configuring backup user
Otherwise puppet might try to setup the backup user even before
the service is running and will fail.
2013-12-18 13:35:20 +01:00
Srinath M
a571df4c79 Fixed testing for creating a DB with the [if not exists] clause 2013-12-16 09:59:43 -05:00
Ashley Penney
7224f12c25 Fixes to various failing tests. 2013-12-10 18:21:57 -05:00
Ashley Penney
90c5abc4bb Add tests for all missing parameters.
This commit adds tests for the parameters that were previously untested.
Most of this testing is light, but all parameters of the module are now
called at least once.  Generally we're testing the happy path, so these
need further work in future.
2013-12-10 16:56:20 -05:00
Hunter Haugen
0aed9e07f7 Adding beaker-rspec test files
These tests are more or less parity with the rspec-system tests, though
dependent on a few patches that still have to make it into beaker and
beaker-rspec
2013-12-06 14:52:41 -08:00
Igor Galić
38dc05a1b6 Merge pull request #375 from ezheidtmann/parameterize-backup-dir-mode
Parameterize backup directory mode and ownership
2013-11-17 07:49:56 -08:00
Igor Galić
6ae9bc61d4 Merge pull request #376 from w32-blaster/master
Type mysql_grant fixed, spec test created
2013-11-17 07:47:50 -08:00
Tamas Szasz
aee0e01d81 Type mysql_grant was limited to work only with resource names foo@localhost/*.* or foo@localhost/bar.* but NOT with root@localhost/@ which is the parsed value of "GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION" grant line.
New spec test was created for the type mysql_grant.rb
2013-11-16 19:11:39 +01:00
Evan Heidtmann
c654fe1ba8 Parameterize backup directory mode and ownership 2013-11-15 20:55:21 -08:00
Ashley Penney
353c19dae8 Fix broken test on RedHat. 2013-11-14 18:40:46 -05:00
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
Lebedev Vadim
6cef2e8af4 Merge branch 'master' of https://github.com/puppetlabs/puppetlabs-mysql 2013-07-02 21:42:49 +04:00
Ashley Penney
f3e5c89551 Merge pull request #187 from RsrchBoy/topic/perl
add mysql::perl helper class
2013-07-02 10:37:10 -07:00
Lebedev Vadim
ead86b5a3f Merge branch 'master' of https://github.com/puppetlabs/puppetlabs-mysql
Conflicts:
	manifests/config.pp
2013-07-02 21:26:43 +04:00
Simon Effenberg
7f7e886d71 handling of my.cnf config file is now optional
This adds a parameter (default value is like old behavior) so that the
my.cnf file isn't managed (created/updated) by the mysql module at all
which is necessary for our environment. We need to set all parameters by
ourself. If we don't set a parameter then the default from the mysqld
binary should be used instead of any default parameter the mysql module
provides us.
2013-07-02 10:01:21 +02:00