Add --tail flag as option on logs.

Closes #265
Signed-off-by: Stéphane Seguin <stephseguin93@gmail.com>
This commit is contained in:
Stéphane Seguin 2016-02-28 22:00:53 +01:00
commit 9b36dc5c54
6 changed files with 33 additions and 9 deletions

View file

@ -1171,6 +1171,14 @@ class CLITestCase(DockerClientTestCase):
self.assertRegexpMatches(result.stdout, '(\d{4})-(\d{2})-(\d{2})T(\d{2})\:(\d{2})\:(\d{2})')
def test_logs_tail(self):
self.base_dir = 'tests/fixtures/logs-tail-composefile'
self.dispatch(['up'], None)
result = self.dispatch(['logs', '--tail', '2'], None)
assert result.stdout.count('\n') == 3
def test_kill(self):
self.dispatch(['up', '-d'], None)
service = self.project.get_service('simple')