Commit Graph

731 Commits

Author SHA1 Message Date
Sergey A
822eb76a1c Docs: add sample keyfile.toml 2021-07-01 10:46:14 +03:00
lilydjwg
92e422c726 add doc for the cratesio source
closes #192
[skip ci]
2021-07-01 15:04:56 +08:00
lilydjwg
6fd3ba95ba apt: handle multiple verions correctly
closes #191
2021-06-25 15:22:40 +08:00
lilydjwg
4c4b770c27 docs: clarify behavior when from_pattern is not matched
[skip ci]
2021-06-24 11:18:35 +08:00
lilydjwg
ffaca8c949 option to not verify HTTPS certificate
fixes #190.
2021-06-23 16:08:47 +08:00
lilydjwg
3eee6480ab docs: remove trailling space
[skip ci]
2021-06-11 16:19:49 +08:00
Maud LAURENT
9deb55806d
Add optional token for regex and httpheader. Add htmlparser source (#182)
add an httptoken option; add htmlparser with xpath source

Co-authored-by: Maud LAURENT <maud.laurent@eurecia.com>
Co-authored-by: lilydjwg <lilydjwg@gmail.com>
2021-06-11 16:18:39 +08:00
lilydjwg
4033c0b9ba fix a typo in the docs
[skip ci]
2021-06-08 15:11:20 +08:00
lilydjwg
3c2abb01f0 update docs for combiner
[skip ci]
2021-06-08 15:07:44 +08:00
lilydjwg
ae506ba9cf add a combiner source and the underlying mechanism to wait for other entries' results 2021-06-08 14:55:57 +08:00
lilydjwg
d83d8d5367 aur: avoid the asyncio.wait warning 2021-06-06 12:26:53 +08:00
lilydjwg
943847da74 container: fix test 2021-06-06 12:26:44 +08:00
lilydjwg
68fcfe3924 container: add pagination
fixes #189
2021-06-06 12:13:07 +08:00
依云
6f7633a93c
Merge pull request #188 from yan12125/fix-test-pacman
Fix test_pacman in some scenarios
2021-06-03 12:38:14 +08:00
Chih-Hsuan Yen
1064f3d948
Update test_anitya.py
Shutter is now actively developed :)
2021-06-03 12:33:07 +08:00
Chih-Hsuan Yen
61bc0c5562
Fix test_pacman in some scenarios
For example, on reproducible.archlinux.org, apparently pacman databases
are not synced before building synced before building packages, and thus
packages cannot be found. From https://reproducible.archlinux.org/api/v0/builds/110565/log,

=================================== FAILURES ===================================
_________________________________ test_pacman __________________________________

get_version = <function get_version.<locals>.__call__ at 0x7f2fa5ed1310>

    async def test_pacman(get_version):
>       assert await get_version("ipw2100-fw", {
            "source": "pacman",
        }) == "1.3-10"

tests/test_pacman.py:11:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:46: in __call__
    newvers = await run(entries)
tests/conftest.py:40: in run
    return await main.run(result_coro, runner_coro)
nvchecker/__main__.py:92: in run
    return await result_fu
nvchecker/core.py:361: in process_result
    r1 = _process_result(r)
nvchecker/core.py:322: in _process_result
    logger.error(version.msg, **kw)
/usr/lib/python3.9/site-packages/structlog/_log_levels.py:118: in meth
    return self._proxy_to_logger(name, event, **kw)
/usr/lib/python3.9/site-packages/structlog/_base.py:198: in _proxy_to_logger
    args, kw = self._process_event(method_name, event, event_kw)
/usr/lib/python3.9/site-packages/structlog/_base.py:155: in _process_event
    event_dict = proc(self._logger, method_name, event_dict)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

logger = <PrintLogger(file=<_io.TextIOWrapper name="<_io.FileIO name=6 mode='rb+' closefd=True>" mode='r+' encoding='utf-8'>)>
method_name = 'error'
event_dict = {'cmd': "LANG=C pacman -Si ipw2100-fw | grep -F Version | awk '{print $3}' | head -n 1", 'error': "warning: database f...r: package 'ipw2100-fw' was not found", 'event': 'command exited without output', 'logger_name': 'nvchecker.core', ...}

    def proc(logger, method_name, event_dict):
      if method_name in ('warning', 'error'):
        if 'exc_info' in event_dict:
          raise event_dict['exc_info']
        if not event_dict['event'].startswith(('rate limited', 'no-result')):
>         raise RuntimeError(event_dict['event'])
E         RuntimeError: command exited without output

tests/conftest.py:85: RuntimeError
----------------------------- Captured stdout call -----------------------------
running cmd
__________________________ test_pacman_strip_release ___________________________

get_version = <function get_version.<locals>.__call__ at 0x7f2fa5ed1310>

    async def test_pacman_strip_release(get_version):
>       assert await get_version("ipw2100-fw", {
            "source": "pacman",
            "strip_release": 1,
        }) == "1.3"

tests/test_pacman.py:16:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:46: in __call__
    newvers = await run(entries)
tests/conftest.py:40: in run
    return await main.run(result_coro, runner_coro)
nvchecker/__main__.py:92: in run
    return await result_fu
nvchecker/core.py:361: in process_result
    r1 = _process_result(r)
nvchecker/core.py:322: in _process_result
    logger.error(version.msg, **kw)
/usr/lib/python3.9/site-packages/structlog/_log_levels.py:118: in meth
    return self._proxy_to_logger(name, event, **kw)
/usr/lib/python3.9/site-packages/structlog/_base.py:198: in _proxy_to_logger
    args, kw = self._process_event(method_name, event, event_kw)
/usr/lib/python3.9/site-packages/structlog/_base.py:155: in _process_event
    event_dict = proc(self._logger, method_name, event_dict)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

logger = <PrintLogger(file=<_io.TextIOWrapper name="<_io.FileIO name=6 mode='rb+' closefd=True>" mode='r+' encoding='utf-8'>)>
method_name = 'error'
event_dict = {'cmd': "LANG=C pacman -Si ipw2100-fw | grep -F Version | awk '{print $3}' | head -n 1", 'error': "warning: database f...r: package 'ipw2100-fw' was not found", 'event': 'command exited without output', 'logger_name': 'nvchecker.core', ...}

    def proc(logger, method_name, event_dict):
      if method_name in ('warning', 'error'):
        if 'exc_info' in event_dict:
          raise event_dict['exc_info']
        if not event_dict['event'].startswith(('rate limited', 'no-result')):
>         raise RuntimeError(event_dict['event'])
E         RuntimeError: command exited without output

tests/conftest.py:85: RuntimeError
----------------------------- Captured stdout call -----------------------------
running cmd
2021-06-03 12:11:41 +08:00
lilydjwg
8db5c6a938 doc: we may need a newer rtd theme 2021-05-23 17:47:12 +08:00
lilydjwg
c65513b37d doc: clarify options of the container source
See also: https://github.com/lilydjwg/nvchecker/issues/183
2021-05-23 17:38:19 +08:00
依云
9d2d47ed15
Merge pull request #181 from yan12125/update-tests
Update tests
2021-05-06 13:07:47 +08:00
Chih-Hsuan Yen
134a6885f1
Update tests 2021-05-06 12:44:55 +08:00
依云
d7c553ae94
Merge pull request #179 from marsam/fix-test_httpheader
tests: add needs_net marker to httpheader test
2021-03-21 11:19:20 +08:00
Mario Rodas
7366d82bfc tests: add needs_net marker to httpheader test 2021-03-20 04:20:00 +00:00
lilydjwg
1b7736a549 bump version to 2.4dev and fix docs/*.py being included in dist tarball 2021-03-19 13:51:48 +08:00
lilydjwg
46da41147f version 2.3
update docs for gitlab source.
2021-03-19 13:41:26 +08:00
lilydjwg
f8f261c476 gitlab: omit default branch if not specified, fix for blm 2021-03-18 13:19:05 +08:00
依云
968af3df0b
Merge pull request #178 from yan12125/test-sortversion
Use pytest for sortversion tests
2021-02-21 17:37:07 +08:00
Chih-Hsuan Yen
bf8a4c9298
Use pytest for sortversion tests 2021-02-21 15:24:01 +08:00
依云
bace59de78
Merge pull request #177 from yan12125/patch-1
Fix tests
2021-02-14 08:50:45 +08:00
Chih-Hsuan Yen
e6e8573c33
Fix tests
Upstream commits: https://salsa.debian.org/med-team/golang-github-dataence-porter2/-/commits/master
2021-02-13 23:30:48 +08:00
lilydjwg
de0a5fe02e github actions: omit pypy tests
continue-on-error doesn't work as expected and there is no way to
"allow-failure". See https://github.com/actions/toolkit/issues/399.
2021-02-01 17:58:14 +08:00
lilydjwg
27269534d2 update test status badget 2021-02-01 17:43:55 +08:00
lilydjwg
0114a411f2 switch tests from travis to github actions
because travis queues are too long.
2021-02-01 15:17:44 +08:00
依云
d2a5a1bf79
Merge pull request #176 from aminvakil/master
Correct package name in httpheader test
2021-01-29 16:58:47 +08:00
Amin Vakil
d2130b64c6
Correct package name in httpheader test 2021-01-29 12:18:00 +03:30
lilydjwg
29f2bad400 tests: use another url because jmeter-plugins.org one has issues with Tornado's simple HTTP client. 2021-01-29 16:11:11 +08:00
lilydjwg
305c329e02 add a httpheader source
see #175 for use cases.
2021-01-28 18:05:58 +08:00
lilydjwg
9c2d2a39d7 httpclient: add follow_redirects argument 2021-01-28 17:56:18 +08:00
lilydjwg
2e069fe1c7 add headers to HTTP Response objects and support for HTTP HEAD method 2021-01-28 17:43:09 +08:00
lilydjwg
8b9bd1ca1c Merge remote-tracking branch 'origin/pr/173' 2021-01-17 20:21:06 +08:00
Chih-Hsuan Yen
91daf5ad4d
Make the generated man page reproducible 2021-01-17 17:20:10 +08:00
lilydjwg
e09750b7a2 pypi source: use packaging.version.Version directly 2021-01-15 15:40:23 +08:00
lilydjwg
491a71add7 git source: support fetching commit hash on a branch 2020-12-24 22:01:22 +08:00
lilydjwg
a0c32ce5f0 travis: test on Python 3.9 2020-12-24 22:01:22 +08:00
依云
d053fc3ba4
Merge pull request #169 from felixonmars/limit-entry
Add a command line option to run nvchecker only on a specific entry
2020-11-17 11:44:06 +08:00
Felix Yan
e6c0ce38e5
Add a command line option to run nvchecker only on a specific entry
This is useful for debugging purpose, when your nvchecker.toml is very
large.
2020-11-17 06:34:53 +08:00
lilydjwg
e5a28b0fb1 bump version to 2.3dev 2020-11-10 23:27:55 +08:00
lilydjwg
372454136f tests/test_alpm: add --nosign and remove an unused import 2020-11-10 23:27:09 +08:00
DDoSolitary
5622d6d0c1
add ALPM source 2020-11-09 05:07:14 +08:00
lilydjwg
630f41c19b docs: a missed - -> _ conversion
[skip ci]
2020-11-05 00:11:03 +08:00
lilydjwg
64994e4a74 version 2.2 2020-11-03 14:29:45 +08:00