Merge "Set "StatsdServer" in PurgeOldLogIPDataTest for maintenance script"

This commit is contained in:
jenkins-bot 2024-11-22 12:13:19 +00:00 committed by Gerrit Code Review
commit a90a5d36f4

View file

@ -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();
}