Skip to content

Commit 599947f

Browse files
committed
Fix for failing test’s
Removed a test file that was missed by my first sweep Updated if statement to account for differences between the now removed built in dirname function and the stdlib version
1 parent 32a62f9 commit 599947f

File tree

2 files changed

+10
-107
lines changed

2 files changed

+10
-107
lines changed

Diff for: manifests/server/config.pp

+10-5
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,16 @@
4444
# on mariadb systems, $includedir is not defined, but /etc/my.cnf.d has
4545
# to be managed to place the server.cnf there
4646
$configparentdir = dirname($mysql::server::config_file)
47-
if $configparentdir != '/' and $configparentdir != '/etc' and $configparentdir
48-
!= $includedir and $configparentdir != dirname($includedir) {
49-
file { $configparentdir:
50-
ensure => directory,
51-
mode => '0755',
47+
# Before setting $configparentdir we first check to make sure that it's value is valid
48+
if $configparentdir != '/' and $configparentdir != '/etc' {
49+
# We then check that the value of $includedir is either undefined or that different from $configparentdir
50+
# We first check that it is undefined due to dirname throwing an error when given undef/empty strings
51+
if $includedir == undef or $includedir == '' or
52+
($configparentdir != $includedir and $configparentdir != dirname($includedir)) {
53+
file { $configparentdir:
54+
ensure => directory,
55+
mode => '0755',
56+
}
5257
}
5358
}
5459
}

Diff for: spec/unit/puppet/functions/mysql_deepmerge_spec.rb

-102
This file was deleted.

0 commit comments

Comments
 (0)