Set "StatsdServer" in PurgeOldLogIPDataTest for maintenance script

Change-Id: I55ab7244aad1054763aabdf323cf11130cc99069
This commit is contained in:
Aaron Schulz 2024-11-21 11:20:19 -08:00
parent facba232a0
commit f1f2f601ef

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