Beispiel #1
0
 def setUp(self):
     logging.getLogger().setLevel(logging.WARN)
     consul = mock.MagicMock()
     manta = mock.MagicMock()
     my = mock.MagicMock()
     my.datadir = tempfile.mkdtemp()
     self.node = manage.Node(consul=consul, snaps=manta, mysql=my)
Beispiel #2
0
 def setUp(self):
     logging.getLogger().setLevel(logging.WARN)
     consul = mock.MagicMock()
     manta = mock.MagicMock()
     my = mock.MagicMock()
     cp = ContainerPilot()
     cp.load(get_environ())
     my.datadir = tempfile.mkdtemp()
     cp.state = PRIMARY
     my.datadir = tempfile.mkdtemp()
     self.node = manage.Node(consul=consul, cp=cp, snaps=manta, mysql=my)
Beispiel #3
0
 def setUp(self):
     logging.getLogger().setLevel(logging.WARN)
     consul = mock.MagicMock()
     my = mock.MagicMock()
     cp = ContainerPilot()
     cp.load(get_environ())
     temp_file = tempfile.NamedTemporaryFile()
     cp.path = temp_file.name
     my.datadir = tempfile.mkdtemp()
     self.node = manage.Node(consul=consul, cp=cp, mysql=my)
     self.node.ip = '192.168.1.101'
     self.node.name = 'node1'