Commit graph

76 commits

Author SHA1 Message Date
Bryan Jen
561a6b067c (maint) clean up some tests and skip skip-name-resolve for now on 5.7+ 2016-08-17 13:48:09 -07:00
Bryan Jen
0ea083b643 (MODULES-3716) Fixes mysql_grant tests to create procedure before grant 2016-08-17 09:55:33 -07:00
Bryan Jen
561ad9a7a7 Fixes procedure grant tests for 5.7.12 2016-08-11 16:49:01 -07:00
Bryan Jen
8c750a2748 Fixes tests for mysql_grant to work with 5.7.12 2016-08-09 16:34:09 -07:00
Bryan Jen
4492ec7483 Fix short password_hash on mysql_user tests 2016-08-09 15:46:44 -07:00
Bryan Jen
d9203e6e1f Fix broken plugin tests on Xenial 2016-08-09 15:20:42 -07:00
Bryan Jen
e2fad83c1c Skips mysqlbackup.sh tests on MySQL 5.7+ 2016-05-26 11:18:27 -07:00
David Schmitt
04fb127bec Update to newest modulesync_configs [9ca280f] 2016-04-18 20:15:09 +01:00
Hunter Haugen
f4fe313e65 Remove mysql_table_exists() function
This function is intended to check for the existence of a table before
declaring some resource, but this is neither portable (because functions
orun on the master, not the agent) nor one-run idempotent (because the
function would run before mysql is even installed, and would take two
runs to do anything).

The correct way of doing this would be to update the providers and
dependency ordering to handle the conditional states.

Luckily this was never released so it is backwards compatible.
2016-03-28 10:48:58 -07:00
David Schmitt
95841d3a8c (FM-4563) fix tmpdir to be shared across examples 2016-01-19 10:45:25 +00:00
David Schmitt
2de4597ecd (maint) refactor main acceptance suite
This reduces duplication of testing code and makes the intent of the tests
clearer.
2016-01-18 15:15:32 +00:00
Artur Gadelshin
e518abd97e (MODULES-2767) allow to check if table exists before grant 2015-11-07 19:23:20 +03:00
David Schmitt
5f49c45b2e (MODULES-2683) fix version compare to properly suppress show_diff for root password 2015-10-13 11:29:53 +01:00
Travis Fields
d3901f205a (fix) - Change default for mysql::server::backup to ignore_triggers => false
- Update spec acceptance test to check for which version is currently installed prior to testing
2015-05-12 09:45:10 -07:00
Steven C. Saliman
ec14b87a81 Added options for including/excluding triggers and routines, and fixed a permission problem that was preventing triggers from being backed up 2015-04-30 08:01:06 -06:00
Morgan Haskel
298242e043 MODULES-1928 - allow log-error to be undef
Wrap the file resource so that this doesn't explode if log-error is
undef. This is required for syslogging.
2015-04-13 17:05:22 -07:00
Colleen Murphy
551d22fb84 Fix acceptance tests from #648
Missed Lucid the first time.
2015-01-27 15:05:37 -08:00
Colleen Murphy
80236d1f3a Fix acceptance tests from #641 2015-01-27 13:42:24 -08:00
Daniël van Eeden
74132ec038 Add type & provider for managing plugins 2015-01-26 15:03:45 +01:00
Morgan Haskel
23c192df9f Merge pull request #634 from cyberious/ResourceTest
MODULES-1520 add test to assert it does not break
2015-01-02 11:52:06 -05:00
Travis Fields
d9d02718b8 MODULES-1520 add test to assert it does not break 2014-12-31 16:48:54 -08:00
Morgan Haskel
f92a24ef3d MODULES-1520 - update username validation
Don't fail on validation where the user isn't quoted with special
characters. The providers quote these strings by default.
2014-12-31 11:50:48 -08: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
138820b3b8 Don't check the variable here, we can trust mysql to work. 2014-08-07 17:53:26 -04:00
Ashley Penney
994ac1a058 Rebuild the acceptance tests. 2014-08-07 15:52:19 -04: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
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
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
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
Morgan Haskel
c57c762810 Package rename in Ubuntu 14.04. 2014-05-09 16:39:10 -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
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
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