koji test infrastructure and tox
by Ken Dreyer
Hi folks,
I was working with another developer recently to run Koji's unit
tests. There are a couple of different ways to do it.
1. The Makefile provides a few targets, like "make test", which runs
"make test2" and "make test3"
2. https://jenkins-fedora-infra.apps.ci.centos.org/job/koji sets up a
virtualenv (with --system-site-packages) and runs the tests through
that.
I think there is an opportunity to unify and modernize this. Ideally
we'd have one way to run the tests, and we could simplify the Jenkins
job configuration so that it's easier to replicate the exact Jenkins
job commands locally.
We're looking into running the unit tests with tox, a tool that fits
well with Python's virtualenv and allows us to execute tests with
multiple Python versions. Tox is used across several other projects
like Pungi and rpkg.
We're working on a prototype that works on CentOS and Fedora. We
should have a pull request up soon.
- Ken
2 years, 10 months
use of staticmethod in kojihub.py
by Ken Dreyer
Someone was asking me recently why hub/kojihub.py has a convention like:
listChannels = staticmethod(list_channels)
Is it fine to just remove this and use the @staticmethod decorator on
all the "public API" methods everywhere?
- Ken
2 years, 11 months