def test_nodeBooterDomainNameOverride(self):
"""Test that we can allow the user to override the domainname with the --domainname argument."""
domainName = scatest.getTestDomainName()
domainMgrURI = URI.stringToName("%s/%s" % (domainName, domainName))
# Test that we don't already have a bound domain
try:
domMgr = self._root.resolve(domainMgrURI)
self.assertEqual(domMgr, None)
except CosNaming.NamingContext.NotFound:
pass # This exception is expected
args = ["../../control/framework/nodeBooter","-D", "--domainname", domainName, "-debug", "9","--nopersist" ]
nb = Popen(args, cwd=scatest.getSdrPath() )
domMgr = self.waitDomainManager(domainMgrURI)
self.assertNotEqual(domMgr, None)
# Kill the nodebooter
os.kill(nb.pid, signal.SIGINT)
self.assertPredicateWithWait(lambda: nb.poll() == 0)
# Test that we cleaned up the name; this should be automatic because
# the naming context should be empty.
try:
domMgr = self._root.resolve(domainMgrURI)
self.assertEqual(domMgr, None)
except CosNaming.NamingContext.NotFound:
pass # This exception is expected
评论列表
文章目录