示例#1
0
 def testManagerSetOnline(self):
     """
     test the setonline option parameter
     """
     opts = Options()  # default options object
     opts.cluster = TEST_CLUSTER
     opts.node = TEST_NODE
     opts.setonline = True
     Manager(opts).doit()
示例#2
0
 def testManagerSetOnlineOption(self):
     """
     test the setonline option parameter
     """
     opts = Options()  # default options object
     opts.cluster = TEST_CLUSTER
     opts.worker = True
     opts.setonline = True
     Manager(opts)
示例#3
0
 def testManagerSetOnline(self):
     """
     test the setonline option parameter
     """
     opts = Options()  # default options object
     opts.cluster = 'cubone'
     opts.node = 'node613'
     opts.setonline = True
     Manager(opts).doit()
示例#4
0
 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()
示例#5
0
    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)
示例#6
0
    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)