Commit graph

31 commits

Author SHA1 Message Date
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
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
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
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
27a70f5b52 Update nodesets. 2014-02-12 19:30:51 -05: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
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
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
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
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