[svn r63091] report some more info on dist-setup

shift comments

--HG--
branch : trunk
This commit is contained in:
hpk
2009-03-19 19:25:13 +01:00
parent 6f2cca80ae
commit a94359c791
8 changed files with 42 additions and 18 deletions

View File

@@ -565,9 +565,9 @@ class SocketGatewaySetup:
## cls.gw.exit()
## cls.proxygw.exit()
def getsshhost():
def getsshhost(withpython=False):
sshhost = py.test.config.getvalueorskip("sshhost")
if sshhost.find(":") != -1:
if not withpython and sshhost.find(":") != -1:
sshhost = sshhost.split(":")[0]
ssh = py.path.local.sysfind("ssh")
if not ssh:

View File

@@ -1,7 +1,5 @@
"""
tests for
- gateway specifications
- multi channels and multi gateways
- gateway management
- manage rsyncing of hosts
@@ -10,10 +8,18 @@
import py
from py.__.execnet.gwmanage import GatewayManager, HostRSync
pytest_plugins = "pytest_pytester"
class TestGatewayManagerPopen:
def test_hostmanager_popen_makegateway(self):
def test_hostmanager_popen_makegateway(self, eventrecorder):
hm = GatewayManager(["popen"] * 2)
hm.makegateways()
event = eventrecorder.popevent("gwmanage_newgateway")
gw = event.args[0]
assert gw.id == "[1]"
event = eventrecorder.popevent("gwmanage_newgateway")
gw = event.args[0]
assert gw.id == "[2]"
assert len(hm.gateways) == 2
hm.exit()
assert not len(hm.gateways)