Esempio n. 1
0
 def setUp(self, mocked):
     instance = mocked.return_value
     instance.create_container.return_value = {'Id': 'mocked'}
     instance.port.return_value = [{
         'HostIp': '127.0.0.1',
         'HostPort': 1234
     }]
     instance.containers.return_value = [{
         u'Command':
         u'/entrypoint.sh redis-server',
         u'Created':
         1443632967,
         u'Id':
         u'mocked',
         u'Image':
         u'redis',
         u'Labels': {},
         u'Names': [u'/livetest-redis-tLJpZ'],
         u'Ports': [{
             u'PrivatePort': 6379,
             u'Type': u'tcp'
         }],
         u'Status':
         u'Up About a minute'
     }]
     self.instance = instance
     self.builder = PostgresDockerRunner(network_mode="host")
 def setUp(self):
     self.name = 'livetest-postgres-{}'.format(gen_salt(5))
     self.builder = PostgresDockerRunner(
         name=self.name,
     )
     self.builder.start()
     self.port = self.builder.client.port(
         self.builder.container['Id'],
         5432
     )[0]['HostPort']
Esempio n. 3
0
 def setUp(self):
     self.name = 'livetest-postgres-{}'.format(gen_salt(5))
     self.builder = PostgresDockerRunner(name=self.name, )