mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-11 13:40:07 +00:00
Conditionalize the number of files expected: 14 or 15 depending on if the box has a default my.cnf somewhere.
This commit is contained in:
@@ -32,13 +32,14 @@ ok(
|
||||
"Using --save-samples doesn't mistakenly delete the target dir"
|
||||
);
|
||||
|
||||
# If the box has a default my.cnf (e.g. /etc/my.cnf) there
|
||||
# should be 15 files, else 14.
|
||||
my @files = glob("$dir/*");
|
||||
|
||||
is(
|
||||
scalar @files,
|
||||
14,
|
||||
my $n_files = scalar @files;
|
||||
ok(
|
||||
$n_files == 15 || $n_files == 14,
|
||||
"And leaves all files in there"
|
||||
);
|
||||
) or diag($n_files, `ls -l $dir`);
|
||||
|
||||
undef($dir);
|
||||
|
||||
|
Reference in New Issue
Block a user