1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-15 01:04:37 +02:00

Stupid compress issue was in the unit test - but did tighten up the code a bit.

This commit is contained in:
David Steele
2014-06-15 19:18:26 -04:00
parent d162ce203d
commit 0b3b743f5a
2 changed files with 17 additions and 32 deletions

View File

@ -859,6 +859,7 @@ sub BackRestFileTest
{
system("gzip ${strSourceFile}");
$strSourceFile .= ".gz";
$strDestinationFile .= ".gz";
}
my $strSourceHash = $oFile->hash(PATH_ABSOLUTE, $strSourceFile);
@ -953,15 +954,15 @@ sub BackRestFileTest
if ($bDestinationCompressed)
{
system("gzip -d ${strDestinationFileCheck}") or die "could not decompress";
system("gzip -d ${strDestinationFileCheck}") == 0 or die "could not decompress ${strDestinationFileCheck}";
}
# my $strDestinationHash = $oFile->hash(PATH_ABSOLUTE, $strDestinationFile);
#
# if ($strSourceHash ne $strDestinationHash)
# {
# confess "source ${strSourceHash} and destination ${strDestinationHash} file hashes do not match";
# }
my $strDestinationHash = $oFile->hash(PATH_ABSOLUTE, $strDestinationFile);
if ($strSourceHash ne $strDestinationHash)
{
confess "source ${strSourceHash} and destination ${strDestinationHash} file hashes do not match";
}
}
}
}