mirror of
https://github.com/lilydjwg/nvchecker.git
synced 2025-03-10 06:14:02 +00:00
Make mirror and suite mandatory
This commit is contained in:
parent
da5b489173
commit
a018f71186
3 changed files with 10 additions and 4 deletions
|
@ -625,10 +625,10 @@ srcpkg
|
||||||
Name of the APT source package.
|
Name of the APT source package.
|
||||||
|
|
||||||
mirror
|
mirror
|
||||||
URL of the repository (defaults to http://deb.debian.org/debian/)
|
URL of the repository.
|
||||||
|
|
||||||
suite
|
suite
|
||||||
Name of the APT repository release (jessie, wheezy, etc, defaults to sid)
|
Name of the APT repository release (jessie, wheezy, etc)
|
||||||
|
|
||||||
repo
|
repo
|
||||||
Name of the APT repository (main, contrib, etc, defaults to main)
|
Name of the APT repository (main, contrib, etc, defaults to main)
|
||||||
|
|
|
@ -24,8 +24,8 @@ async def get_url(url):
|
||||||
async def get_version(name, conf, *, cache, **kwargs):
|
async def get_version(name, conf, *, cache, **kwargs):
|
||||||
srcpkg = conf.get('srcpkg')
|
srcpkg = conf.get('srcpkg')
|
||||||
pkg = conf.get('pkg')
|
pkg = conf.get('pkg')
|
||||||
mirror = conf.get('mirror', "http://deb.debian.org/debian/")
|
mirror = conf['mirror']
|
||||||
suite = conf.get('suite', 'sid')
|
suite = conf['suite']
|
||||||
repo = conf.get('repo', 'main')
|
repo = conf.get('repo', 'main')
|
||||||
arch = conf.get('arch', 'amd64')
|
arch = conf.get('arch', 'amd64')
|
||||||
strip_release = conf.get('strip_release', False)
|
strip_release = conf.get('strip_release', False)
|
||||||
|
|
|
@ -10,6 +10,8 @@ pytestmark = [pytest.mark.asyncio, pytest.mark.needs_net]
|
||||||
async def test_apt(get_version):
|
async def test_apt(get_version):
|
||||||
assert await get_version("sigrok-firmware-fx2lafw", {
|
assert await get_version("sigrok-firmware-fx2lafw", {
|
||||||
"source": "apt",
|
"source": "apt",
|
||||||
|
"mirror": "http://deb.debian.org/debian/",
|
||||||
|
"suite": "sid",
|
||||||
}) == "0.1.7-1"
|
}) == "0.1.7-1"
|
||||||
|
|
||||||
@flaky(max_runs=10)
|
@flaky(max_runs=10)
|
||||||
|
@ -17,12 +19,16 @@ async def test_apt_source_pkg(get_version):
|
||||||
assert await get_version("test", {
|
assert await get_version("test", {
|
||||||
"source": "apt",
|
"source": "apt",
|
||||||
"source_pkg": "golang-github-dataence-porter2",
|
"source_pkg": "golang-github-dataence-porter2",
|
||||||
|
"mirror": "http://deb.debian.org/debian/",
|
||||||
|
"suite": "sid",
|
||||||
}) == "0.0~git20150829.56e4718-2"
|
}) == "0.0~git20150829.56e4718-2"
|
||||||
|
|
||||||
@flaky(max_runs=10)
|
@flaky(max_runs=10)
|
||||||
async def test_apt_strip_release(get_version):
|
async def test_apt_strip_release(get_version):
|
||||||
assert await get_version("sigrok-firmware-fx2lafw", {
|
assert await get_version("sigrok-firmware-fx2lafw", {
|
||||||
"source": "apt",
|
"source": "apt",
|
||||||
|
"mirror": "http://deb.debian.org/debian/",
|
||||||
|
"suite": "sid",
|
||||||
"strip_release": 1,
|
"strip_release": 1,
|
||||||
}) == "0.1.7"
|
}) == "0.1.7"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue