Dump unit tests no longer fail if gzip is not available
authorbtongminh <bryan.tongminh@gmail.com>
Tue, 1 Jan 2013 14:01:03 +0000 (15:01 +0100)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 29 Jan 2013 10:31:01 +0000 (10:31 +0000)
Change-Id: Id1890984124028cb44960977c18572f1f6fded4c

tests/phpunit/maintenance/backupTextPassTest.php
tests/phpunit/maintenance/backup_LogTest.php
tests/phpunit/maintenance/backup_PageTest.php

index 5930e9b..2a12806 100644 (file)
@@ -417,6 +417,7 @@ class TextPassDumperTest extends DumpTestCase {
         * @group large
         */
        function testCheckpointGzip() {
+               $this->checkHasGzip();
                $this->checkpointHelper( "gzip" );
        }
 
index 0aed411..afd8f43 100644 (file)
@@ -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,
index 7966fe8..d7f2feb 100644 (file)
@@ -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();