def testAckService(self): """ test the setoffline option parameter """ opts = Options() # default options object opts.cluster = TEST_CLUSTER opts.node = 'node2201-node2208' opts.ack_service = "Swapping" Manager(opts)
def testAckService(self): """ test the setoffline option parameter """ opts = Options() # default options object opts.cluster = 'cubone' opts.node = 'node610-617' opts.ack_service = "Swapping" Manager(opts)
def testManagerSetOffline(self): """ test the setoffline option parameter """ opts = Options() # default options object opts.cluster = TEST_CLUSTER opts.node = TEST_NODE opts.setoffline = True Manager(opts).doit()
def testManagerSetOffline(self): """ test the setoffline option parameter """ opts = Options() # default options object opts.cluster = 'cubone' opts.node = 'node610' opts.setoffline = True Manager(opts).doit()
def testAck(self): """ test the setoffline option parameter """ opts = Options() # default options object opts.cluster = TEST_CLUSTER opts.node = 'node2201-node2208' opts.setoffline = True opts.ack = True Manager(opts)
def testAck(self): """ test the setoffline option parameter """ opts = Options() # default options object opts.cluster = 'cubone' opts.node = 'node610-617' opts.setoffline = True opts.ack = True Manager(opts)
def testManagerSetOnline(self): """ test the setonline option parameter """ opts = Options() # default options object opts.cluster = 'cubone' opts.node = 'node610' opts.setonline = True #TODO: fails, since no worker nodes can be found Manager(opts).doit()
def testDowntime(self): """ test the setoffline option parameter """ opts = Options() # default options object opts.cluster = TEST_CLUSTER opts.node = 'node2201-node2208' opts.setoffline = True opts.downtime = "2 m" Manager(opts) # should fail opts.downtime = "2h" Manager(opts)
def testDowntime(self): """ test the setoffline option parameter """ opts = Options() # default options object opts.cluster = 'cubone' opts.node = 'node610-617' opts.setoffline = True opts.downtime = "2 m" Manager(opts) # should fail opts.downtime = "2h" Manager(opts)
def testManagerLEDs(self): """ test the Ledon, ledoff and ledstatus option parameter """ opts = Options() # default options object opts.cluster = TEST_CLUSTER opts.node = TEST_NODE opts.ledon = True Manager(opts).doit() # TODO: get led status and test if it's on opts.ledon = False opts.ledoff = True Manager(opts).doit()
def testManagerCreatorNodesFromID(self): """ test the manager constructor with a nodename option """ opts = Options() opts.cluster = TEST_CLUSTER opts.node = 'nosuchnodeid3234#%' opts.setonline = True try: Manager(opts) self.fail("manager didn't fail with unknown node selected") except NodeException: pass else: self.fail("manager didn't fail with a NodeException when an unknown node was selected") opts.node = 'node2201,201,magikarp' Manager(opts) opts.node = 'node2201-node2205' Manager(opts) opts.node = 'node2208,node2203-node2205,magikarp' Manager(opts)
def testManagerCreatorNodesFromID(self): """ test the manager constructor with a nodename option """ opts = Options() opts.cluster = 'cubone' opts.node = 'nosuchnodeid3234#%' opts.setonline = True try: Manager(opts) self.fail("manager didn't fail with unknown node selected") except NodeException: pass else: self.fail("manager didn't fail with a NodeException when an unknown node was selected") opts.node = '32x,node120' try: Manager(opts) self.fail("manager didn't fail with unknown node selected") except NodeException: pass else: self.fail("manager didn't fail with a NodeException when an unknown node was selected") opts.node = 'node323,node120Xde#' try: Manager(opts) self.fail("manager didn't fail with unknown node selected") except NodeException: pass else: self.fail("manager didn't fail with a NodeException when an unknown node was selected") opts.node = 'node323,node120' try: Manager(opts) self.fail("manager didn't fail with unknown node selected") except NodeException: pass else: self.fail("manager didn't fail with a NodeException when an unknown node was selected") opts.node = 'node613,610,magikarp' Manager(opts) opts.node = 'node613-node615' Manager(opts) opts.node = 'node610,node613-node615,magikarp' Manager(opts)