From f1f2f601ef2995a1c5970c395b2d18bd4dcd98e5 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 21 Nov 2024 11:20:19 -0800 Subject: [PATCH] Set "StatsdServer" in PurgeOldLogIPDataTest for maintenance script Change-Id: I55ab7244aad1054763aabdf323cf11130cc99069 --- .../integration/Maintenance/PurgeOldLogIPDataTest.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/integration/Maintenance/PurgeOldLogIPDataTest.php b/tests/phpunit/integration/Maintenance/PurgeOldLogIPDataTest.php index 8a0c09352..716015d42 100644 --- a/tests/phpunit/integration/Maintenance/PurgeOldLogIPDataTest.php +++ b/tests/phpunit/integration/Maintenance/PurgeOldLogIPDataTest.php @@ -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(); }