Speed up integration test and make cleanup easier by using labels
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
This commit is contained in:
parent
d827809ffb
commit
60351a8e07
10 changed files with 47 additions and 53 deletions
|
|
@ -24,6 +24,7 @@ class CLITestCase(DockerClientTestCase):
|
|||
self.project.remove_stopped()
|
||||
for container in self.project.containers(stopped=True, one_off=True):
|
||||
container.remove(force=True)
|
||||
super(CLITestCase, self).tearDown()
|
||||
|
||||
@property
|
||||
def project(self):
|
||||
|
|
@ -207,13 +208,10 @@ class CLITestCase(DockerClientTestCase):
|
|||
self.assertEqual(old_ids, new_ids)
|
||||
|
||||
@patch('dockerpty.start')
|
||||
def test_run_without_command(self, __):
|
||||
def test_run_without_command(self, _):
|
||||
self.command.base_dir = 'tests/fixtures/commands-composefile'
|
||||
self.check_build('tests/fixtures/simple-dockerfile', tag='composetest_test')
|
||||
|
||||
for c in self.project.containers(stopped=True, one_off=True):
|
||||
c.remove()
|
||||
|
||||
self.command.dispatch(['run', 'implicit'], None)
|
||||
service = self.project.get_service('implicit')
|
||||
containers = service.containers(stopped=True, one_off=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue