From a0b99c43724d860f1aa0c53df445ed48a4771252 Mon Sep 17 00:00:00 2001 From: btongminh Date: Tue, 1 Jan 2013 15:01:03 +0100 Subject: [PATCH] Dump unit tests no longer fail if gzip is not available Change-Id: Id1890984124028cb44960977c18572f1f6fded4c --- tests/phpunit/maintenance/backupTextPassTest.php | 1 + tests/phpunit/maintenance/backup_LogTest.php | 2 ++ tests/phpunit/maintenance/backup_PageTest.php | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/tests/phpunit/maintenance/backupTextPassTest.php b/tests/phpunit/maintenance/backupTextPassTest.php index 5930e9b710..2a12806ecd 100644 --- a/tests/phpunit/maintenance/backupTextPassTest.php +++ b/tests/phpunit/maintenance/backupTextPassTest.php @@ -417,6 +417,7 @@ class TextPassDumperTest extends DumpTestCase { * @group large */ function testCheckpointGzip() { + $this->checkHasGzip(); $this->checkpointHelper( "gzip" ); } diff --git a/tests/phpunit/maintenance/backup_LogTest.php b/tests/phpunit/maintenance/backup_LogTest.php index 0aed411f6b..afd8f43730 100644 --- a/tests/phpunit/maintenance/backup_LogTest.php +++ b/tests/phpunit/maintenance/backup_LogTest.php @@ -172,6 +172,8 @@ class BackupDumperLoggerTest extends DumpTestCase { function testXmlDumpsBackupUseCaseLogging() { global $wgContLang; + $this->checkHasGzip(); + // Preparing the dump $fname = $this->getNewTempFile(); $dumper = new BackupDumper( array ( "--output=gzip:" . $fname, diff --git a/tests/phpunit/maintenance/backup_PageTest.php b/tests/phpunit/maintenance/backup_PageTest.php index 7966fe8349..d7f2feb414 100644 --- a/tests/phpunit/maintenance/backup_PageTest.php +++ b/tests/phpunit/maintenance/backup_PageTest.php @@ -232,6 +232,8 @@ class BackupDumperPageTest extends DumpTestCase { } function testCurrentStubGzip () { + $this->checkHasGzip(); + // Preparing the dump $fname = $this->getNewTempFile(); $dumper = new BackupDumper( array ( "--output=gzip:" . $fname ) ); @@ -284,6 +286,8 @@ class BackupDumperPageTest extends DumpTestCase { // We reproduce such a setup with our mini fixture, although we omit // chunks, and all the other gimmicks of xmldumps-backup. // + $this->checkHasGzip(); + $fnameMetaHistory = $this->getNewTempFile(); $fnameMetaCurrent = $this->getNewTempFile(); $fnameArticles = $this->getNewTempFile(); -- 2.20.1