From: Timo Tijhof Date: Tue, 11 Apr 2017 00:57:16 +0000 (-0700) Subject: phpunit: Avoid use of wmf-production host names X-Git-Tag: 1.31.0-rc.0~3532 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=0977b6c1f6a0886803831aa2012895d8c847d0c9;p=lhc%2Fweb%2Fwiklou.git phpunit: Avoid use of wmf-production host names * Remove used of 'eqiad' and 'wmnet' in unit tests. Change-Id: I5bf19b63876e4dc8deaca8cd9907dca0bfa15455 --- diff --git a/maintenance/dictionary/mediawiki.dic b/maintenance/dictionary/mediawiki.dic index a073941895..e7ba8faf20 100644 --- a/maintenance/dictionary/mediawiki.dic +++ b/maintenance/dictionary/mediawiki.dic @@ -1397,7 +1397,6 @@ epcampus epcoordinator epinstructor eponline -eqiad erevoke errno error @@ -4570,7 +4569,6 @@ wmls wmlsc wmlscript wmlscriptc -wmnet wordcount wordprocessingml wordwg diff --git a/tests/phpunit/includes/libs/DnsSrvDiscovererTest.php b/tests/phpunit/includes/libs/DnsSrvDiscovererTest.php index cfd4d76823..9d12b10c24 100644 --- a/tests/phpunit/includes/libs/DnsSrvDiscovererTest.php +++ b/tests/phpunit/includes/libs/DnsSrvDiscovererTest.php @@ -6,7 +6,7 @@ class DnsSrvDiscovererTest extends PHPUnit_Framework_TestCase { * @dataProvider provideRecords */ public function testPickServer( $params, $expected ) { - $discoverer = new DnsSrvDiscoverer( '_etcd._tcp.eqiad.wmnet' ); + $discoverer = new DnsSrvDiscoverer( 'etcd-tcp.example.net' ); $record = $discoverer->pickServer( $params ); $this->assertEquals( $expected, $record ); @@ -18,26 +18,26 @@ class DnsSrvDiscovererTest extends PHPUnit_Framework_TestCase { [ [ // record list [ - 'target' => 'conf1003.eqiad.wmnet', + 'target' => 'conf03.example.net', 'port' => 'SRV', 'pri' => 0, 'weight' => 1, ], [ - 'target' => 'conf1002.eqiad.wmnet', + 'target' => 'conf02.example.net', 'port' => 'SRV', 'pri' => 1, 'weight' => 1, ], [ - 'target' => 'conf1001.eqiad.wmnet', + 'target' => 'conf01.example.net', 'port' => 'SRV', 'pri' => 2, 'weight' => 1, ], ], // selected record [ - 'target' => 'conf1003.eqiad.wmnet', + 'target' => 'conf03.example.net', 'port' => 'SRV', 'pri' => 0, 'weight' => 1, @@ -46,38 +46,38 @@ class DnsSrvDiscovererTest extends PHPUnit_Framework_TestCase { [ [ // record list [ - 'target' => 'conf1003or2.eqiad.wmnet', + 'target' => 'conf03or2.example.net', 'port' => 'SRV', 'pri' => 0, 'weight' => 1, ], [ - 'target' => 'conf1003or2.eqiad.wmnet', + 'target' => 'conf03or2.example.net', 'port' => 'SRV', 'pri' => 0, 'weight' => 1, ], [ - 'target' => 'conf1001.eqiad.wmnet', + 'target' => 'conf01.example.net', 'port' => 'SRV', 'pri' => 2, 'weight' => 1, ], [ - 'target' => 'conf1004.eqiad.wmnet', + 'target' => 'conf04.example.net', 'port' => 'SRV', 'pri' => 2, 'weight' => 1, ], [ - 'target' => 'conf1005.eqiad.wmnet', + 'target' => 'conf05.example.net', 'port' => 'SRV', 'pri' => 3, 'weight' => 1, ], ], // selected record [ - 'target' => 'conf1003or2.eqiad.wmnet', + 'target' => 'conf03or2.example.net', 'port' => 'SRV', 'pri' => 0, 'weight' => 1, @@ -91,19 +91,19 @@ class DnsSrvDiscovererTest extends PHPUnit_Framework_TestCase { $servers = [ [ - 'target' => 'conf1001.eqiad.wmnet', + 'target' => 'conf01.example.net', 'port' => 35, 'pri' => 2, 'weight' => 1, ], [ - 'target' => 'conf1004.eqiad.wmnet', + 'target' => 'conf04.example.net', 'port' => 74, 'pri' => 2, 'weight' => 1, ], [ - 'target' => 'conf1005.eqiad.wmnet', + 'target' => 'conf05.example.net', 'port' => 77, 'pri' => 3, 'weight' => 1, @@ -113,13 +113,13 @@ class DnsSrvDiscovererTest extends PHPUnit_Framework_TestCase { $expected = [ [ - 'target' => 'conf1001.eqiad.wmnet', + 'target' => 'conf01.example.net', 'port' => 35, 'pri' => 2, 'weight' => 1, ], [ - 'target' => 'conf1005.eqiad.wmnet', + 'target' => 'conf05.example.net', 'port' => 77, 'pri' => 3, 'weight' => 1,