def createNet(): tools = testTools.Tools() tools.createTestNet(2, 1, "streight") time.sleep(1) tools.buildTestNet() tools.checkStatus() time.sleep(20) agents = Agent(tools.getAgents(), "shell") agents.addHostsToNodes() return tools, agents
def test_network(self): self.tools = testTools.Tools() self.tools.createTestNet(self.nets, self.nodes, self.mode) time.sleep(1) build = False build = self.tools.buildTestNet() self.assertTrue(build, "Network could not be instantiated.") status = self.tools.checkStatus() self.assertTrue(status[0], status[1]) time.sleep(20) self.tools.getAgents() self.assertTrue(self.tools.checkNodesAlive(), "created nodes not online...") self.assertTrue(self.tools.destroyNet(), "created Nodes still online.") self.tools.deleteDoc()
def createNet(nets, nodes): tstart_rollout = time.time() tools = testTools.Tools() tools.createTestNet(nets, nodes, "streight") time.sleep(1) tools.buildTestNet() done, msg = tools.checkStatus() print msg if done: t_end_rollout = time.time() else: t_end_rollout = 0 t_rollout = t_end_rollout - tstart_rollout time.sleep(10) tstart_destroy = time.time() tools.destroyNet() t_end_destroy = time.time() t_destroy = t_end_destroy - tstart_destroy return t_rollout, t_destroy
def setUp(self): self.tools = testTools.Tools()
def setUpClass(self): self.tools = testTools.Tools()
def setUpClass(self): self.endpoints = testTools.Tools() self.headers = self.endpoints.getHeaders() self.basePath = self.endpoints.getBasepath() self.testDocName = "testDoc" self.docID = -1