mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-23 13:46:48 +00:00
Merge "Set "StatsdServer" in PurgeOldLogIPDataTest for maintenance script"
This commit is contained in:
commit
a90a5d36f4
|
@ -4,6 +4,7 @@ namespace MediaWiki\Extension\AbuseFilter\Tests\Integration;
|
|||
|
||||
use MediaWiki\Config\HashConfig;
|
||||
use MediaWiki\Extension\AbuseFilter\Maintenance\PurgeOldLogIPData;
|
||||
use MediaWiki\MainConfigSchema;
|
||||
use MediaWiki\Tests\Maintenance\MaintenanceBaseTestCase;
|
||||
use Wikimedia\Timestamp\ConvertibleTimestamp;
|
||||
|
||||
|
@ -65,7 +66,10 @@ class PurgeOldLogIPDataTest extends MaintenanceBaseTestCase {
|
|||
|
||||
public function testExecute() {
|
||||
ConvertibleTimestamp::setFakeTime( self::FAKE_TIME );
|
||||
$this->maintenance->setConfig( new HashConfig( [ 'AbuseFilterLogIPMaxAge' => self::MAX_AGE ] ) );
|
||||
$this->maintenance->setConfig( new HashConfig( [
|
||||
'AbuseFilterLogIPMaxAge' => self::MAX_AGE,
|
||||
'StatsdServer' => MainConfigSchema::getDefaultValue( 'StatsdServer' )
|
||||
] ) );
|
||||
$this->expectOutputRegex( '/1 rows/' );
|
||||
$this->maintenance->execute();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue