cli: list-task --after/--before/--all

allow querying for closed tasks

Fixes: https://pagure.io/koji/issue/2565
This commit is contained in:
Tomas Kopecek 2020-11-02 09:37:57 +01:00
parent 812c1a804a
commit 0256282a84
3 changed files with 28 additions and 1 deletions

View file

@ -22,6 +22,9 @@ class TestListTasks(unittest.TestCase):
options.method = None
options.channel = None
options.host = None
options.before = None
options.after = None
options.all = False
session = mock.MagicMock(name='session')
session.getLoggedInUser.return_value = {'id': 1, 'username': 'name'}
session.listTasks.return_value = []
@ -259,4 +262,11 @@ Options:
--channel=CHANNEL Only tasks in this channel
--host=HOST Only tasks for this host
--quiet Do not display the column headers
--before=BEFORE List builds built before this time, time is specified as
timestamp or date/time in any format which can be parsed
by dateutil.parser. e.g. "2020-12-31 12:35" or "December
31st 12:35"
--after=AFTER List builds built after this time (same format as for
--before
--all List also finished tasks (valid only with --after)
""" % self.progname)