1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-02-03 10:06:17 +01:00

Fix 'buildhistory' command by setting the type of the '--limit' option to int

This commit is contained in:
Daniel Mach 2023-04-17 15:31:46 +02:00
parent e299ab98bd
commit 9926791bf0
3 changed files with 7 additions and 2 deletions

View File

@ -11,6 +11,11 @@ Scenario: Run `osc buildist <project>/<package> <repository>/<arch>`
Then the exit code is 0 Then the exit code is 0
Scenario: Run `osc buildist <project>/<package> <repository>/<arch> --limit`
When I execute osc with args "buildhist test:factory/test-pkgA standard/x86_64 --limit=1"
Then the exit code is 0
Scenario: Run `osc buildist <repository>/<arch>` from a package checkout Scenario: Run `osc buildist <repository>/<arch>` from a package checkout
Given I execute osc with args "co test:factory/test-pkgA" Given I execute osc with args "co test:factory/test-pkgA"
And I set working directory to "{context.osc.temp}/test:factory/test-pkgA" And I set working directory to "{context.osc.temp}/test:factory/test-pkgA"

View File

@ -20,7 +20,7 @@ class BuildHistory:
self.package = package self.package = package
self.repository = repository self.repository = repository
self.arch = arch self.arch = arch
self._limit = limit self._limit = int(limit)
self.entries = self._get_entries() self.entries = self._get_entries()
def _get_entries(self): def _get_entries(self):

View File

@ -7381,7 +7381,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
@cmdln.option('', '--csv', action='store_true', @cmdln.option('', '--csv', action='store_true',
help='generate output in CSV (separated by |)') help='generate output in CSV (separated by |)')
@cmdln.option('-l', '--limit', metavar='limit', @cmdln.option('-l', '--limit', metavar='limit', type=int, default=0,
help='for setting the number of results') help='for setting the number of results')
@cmdln.option('-M', '--multibuild-package', metavar='FLAVOR', @cmdln.option('-M', '--multibuild-package', metavar='FLAVOR',
help=HELP_MULTIBUILD_ONE) help=HELP_MULTIBUILD_ONE)