Merge pull request #3751 from ijc25/master

Tidy up remaining lingering docker.client.Client objects in test suite
This commit is contained in:
Daniel Nephin 2016-07-21 11:13:29 -04:00 committed by GitHub
commit a9b5e5abe0
2 changed files with 7 additions and 0 deletions

View File

@ -20,6 +20,11 @@ class ResilienceTest(DockerClientTestCase):
self.db.start_container(container) self.db.start_container(container)
self.host_path = container.get_mount('/var/db')['Source'] self.host_path = container.get_mount('/var/db')['Source']
def tearDown(self):
del self.project
del self.db
super(ResilienceTest, self).tearDown()
def test_successful_recreate(self): def test_successful_recreate(self):
self.project.up(strategy=ConvergenceStrategy.always) self.project.up(strategy=ConvergenceStrategy.always)
container = self.db.containers()[0] container = self.db.containers()[0]

View File

@ -17,6 +17,8 @@ class VolumeTest(DockerClientTestCase):
self.client.remove_volume(volume.full_name) self.client.remove_volume(volume.full_name)
except DockerException: except DockerException:
pass pass
del self.tmp_volumes
super(VolumeTest, self).tearDown()
def create_volume(self, name, driver=None, opts=None, external=None): def create_volume(self, name, driver=None, opts=None, external=None):
if external and isinstance(external, bool): if external and isinstance(external, bool):