Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysqlbackup: Reenable tests #1642

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions manifests/backup/mysqlbackup.pp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
Optional[String[1]] $compression_command = undef,
Optional[String[1]] $compression_extension = undef,
Optional[String[1]] $backupmethod_package = undef,
Array $excludedatabases = [], # unused, compatibility variable for mysql::server::backup class
) inherits mysql::params {
$backuppassword_unsensitive = if $backuppassword =~ Sensitive {
$backuppassword.unwrap
Expand Down
1 change: 1 addition & 0 deletions manifests/server/backup.pp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
# The package which provides the binary specified by the backupmethod parameter.
# @param excludedatabases
# Give a list of excluded databases when using file_per_database, e.g.: [ 'information_schema', 'performance_schema' ]
# Only used for the mysqldump and xtrabackup providers
class mysql::server::backup (
Optional[String[1]] $backupuser = undef,
Optional[Variant[String, Sensitive[String]]] $backuppassword = undef,
Expand Down
5 changes: 3 additions & 2 deletions spec/acceptance/04_mysql_backup_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class { 'mysql::server::backup':
end
end

describe 'mysqlbackup.sh', if: Gem::Version.new(mysql_version) < Gem::Version.new('5.7.0') do
describe 'mysqlbackup.sh' do
it 'runs mysqlbackup.sh with no errors' do
run_shell('/usr/local/sbin/mysqlbackup.sh') do |r|
expect(r.stderr).to eq('')
Expand Down Expand Up @@ -84,6 +84,7 @@ class { 'mysql::server::backup':
backupdir => '/tmp/backups',
backupcompress => true,
file_per_database => true,
provider => 'mysqlbackup',
postscript => [
'rm -rf /var/tmp/mysqlbackups',
'rm -f /var/tmp/mysqlbackups.done',
Expand All @@ -98,7 +99,7 @@ class { 'mysql::server::backup':
end
end

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