Skip to content

Commit 4075727

Browse files
committedSep 20, 2024
mysqlbackup: Reenable tests
Previously the tests were only executed on mysql versions older than 5.7.0. This commit removes the contraint.
1 parent e11ed5b commit 4075727

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed
 

‎manifests/backup/mysqlbackup.pp

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
Optional[String[1]] $compression_command = undef,
3333
Optional[String[1]] $compression_extension = undef,
3434
Optional[String[1]] $backupmethod_package = undef,
35+
Array $excludedatabases = [], # unused, compatibility variable for mysql::server::backup class
3536
) inherits mysql::params {
3637
$backuppassword_unsensitive = if $backuppassword =~ Sensitive {
3738
$backuppassword.unwrap

‎manifests/server/backup.pp

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
# The package which provides the binary specified by the backupmethod parameter.
8787
# @param excludedatabases
8888
# Give a list of excluded databases when using file_per_database, e.g.: [ 'information_schema', 'performance_schema' ]
89+
# Only used for the mysqldump and xtrabackup providers
8990
class mysql::server::backup (
9091
Optional[String[1]] $backupuser = undef,
9192
Optional[Variant[String, Sensitive[String]]] $backuppassword = undef,

‎spec/acceptance/04_mysql_backup_spec.rb

+3-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class { 'mysql::server::backup':
3535
end
3636
end
3737

38-
describe 'mysqlbackup.sh', if: Gem::Version.new(mysql_version) < Gem::Version.new('5.7.0') do
38+
describe 'mysqlbackup.sh' do
3939
it 'runs mysqlbackup.sh with no errors' do
4040
run_shell('/usr/local/sbin/mysqlbackup.sh') do |r|
4141
expect(r.stderr).to eq('')
@@ -84,6 +84,7 @@ class { 'mysql::server::backup':
8484
backupdir => '/tmp/backups',
8585
backupcompress => true,
8686
file_per_database => true,
87+
provider => 'mysqlbackup',
8788
postscript => [
8889
'rm -rf /var/tmp/mysqlbackups',
8990
'rm -f /var/tmp/mysqlbackups.done',
@@ -98,7 +99,7 @@ class { 'mysql::server::backup':
9899
end
99100
end
100101

101-
describe 'mysqlbackup.sh', if: Gem::Version.new(mysql_version) < Gem::Version.new('5.7.0') do
102+
describe 'mysqlbackup.sh' do
102103
it 'runs mysqlbackup.sh with no errors without root credentials' do
103104
run_shell('HOME=/tmp/dontreadrootcredentials /usr/local/sbin/mysqlbackup.sh') do |r|
104105
expect(r.stderr).to eq('')

0 commit comments

Comments
 (0)