Raphaël Badin has proposed merging lp:~rvb/maas/rndc-conflict into lp:maas.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~rvb/maas/rndc-conflict/+merge/118068

This branch makes the test in test_dns use a random port for rndc communication 
instead of the fixed port defined in democeleryconfig.  This way, the rndc port 
used while running the tests does not conflict with the rndc port used in demo 
mode (currently, the tests in test_dns fail if the demo server is running while 
running the tests).

It might look weird to use something from rabbitfixture in there but the 
dependency is already there since bindfixture already depends on the 
rabbitfixture (it uses allocate_ports too).  I think this is fine for now, we 
will refactor this if bindfixture gets its own module someday.
-- 
https://code.launchpad.net/~rvb/maas/rndc-conflict/+merge/118068
Your team Launchpad code reviewers is requested to review the proposed merge of 
lp:~rvb/maas/rndc-conflict into lp:maas.
=== modified file 'src/maasserver/tests/test_dns.py'
--- src/maasserver/tests/test_dns.py	2012-08-01 10:25:21 +0000
+++ src/maasserver/tests/test_dns.py	2012-08-03 12:12:21 +0000
@@ -50,6 +50,7 @@
     DNSZoneConfig,
     )
 from provisioningserver.dns.utils import generated_hostname
+from rabbitfixture.server import allocate_ports
 from testresources import FixtureResource
 from testtools.matchers import MatchesStructure
 
@@ -139,6 +140,8 @@
         self.bind = self.useFixture(BINDServer())
         self.patch(conf, 'DNS_CONFIG_DIR', self.bind.config.homedir)
 
+        # Use a random port for rndc.
+        self.patch(conf, 'DNS_RNDC_PORT', allocate_ports(1)[0])
         # This simulates what should happen when the package is
         # installed:
         # Create MAAS-specific DNS configuration files.

_______________________________________________
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp

Reply via email to