Commit graph

99 commits

Author SHA1 Message Date
Ken Dreyer
e35b571196 util: handle ENOENT in _stripcwd() listdir loop
After we call listdir(), another thread or process might delete files
from the current directory. We cannot always expect lstat() to succeed
in a loop over the initial listdir entries.

If lstat() raises ENOENT, consider this file deleted and move on.
2020-08-27 13:36:27 +02:00
Tomas Kopecek
7855b98ca2 formatTime/Long can handle timestamp
Also replaced *_time with *_ts wherever possible.
2020-08-26 09:26:00 +02:00
Tomas Kopecek
b0efed5e37 Fix time formatting for timezone values
Fixes: https://pagure.io/koji/issue/2423
2020-08-26 09:26:00 +02:00
Simo Sorce
2c663f0b73 Use requests_gssapi instead of requests_kerberos
Retain ability to use the old requests_kerberos where request_gssapi is
not available yet.

Signed-off-by: Simo Sorce <simo@redhat.com>
2020-07-24 15:32:42 -04:00
Tomas Kopecek
f8419e3626 remove deprecated krbV support
Fixes: https://pagure.io/koji/issue/1991
2020-07-24 15:08:47 -04:00
Tomas Kopecek
72c701225b turn off dnf_warning in mock.cfg
Related: https://pagure.io/koji/issue/2026
2020-07-21 23:57:20 -04:00
Tomas Kopecek
a4863c0f26 lib: check consistency of rpm from openRemoteFile
Fixes: https://pagure.io/koji/issue/2130
2020-06-05 10:58:38 +02:00
Tomas Kopecek
8ea4a7245b lib: retry openRemoteFile and check size 2020-06-05 10:58:38 +02:00
Tomas Kopecek
0132313f92 replace logging.warn with warning
call is deprected in python 3.7

Fixes: https://pagure.io/koji/issue/2135
2020-04-22 13:47:15 +02:00
Tomas Kopecek
f9190657d9 Add 'target' policy
Fixes: https://pagure.io/koji/issue/1040
2020-02-11 14:30:25 +01:00
Tomas Kopecek
9e0452377f fix test 2019-11-25 11:54:18 +01:00
Tomas Kopecek
aad9fac8d9 move from urrlib.request.urlopen to requests.get
Fixes: https://pagure.io/koji/issue/1530
2019-11-25 11:31:08 +01:00
Yu Ming Zhu
f7f1c65bea raise error when config search paths is empty
also fix unittest: test_profiles

notes: since the test won't read config files anymore, lift the loop number from 20 -> 256 to increase the probability of hitting the multithread issue

fixes: #1786
2019-11-22 08:43:44 +01:00
Yuming Zhu
b2b8d5f9cc strict per item in config_files 2019-10-15 09:14:16 +02:00
Yu Ming Zhu
4c1928f377 extract read_config_files util for config parsing 2019-10-15 09:14:16 +02:00
Yu Ming Zhu
cace979532 fix unittests 2019-10-10 16:37:57 +02:00
Yuming Zhu
473bc1460b hub: [getRPMFile] add strict behavior 2019-10-10 18:18:32 +08:00
Mike McLean
f0cdeaab07 tests for joinpath 2019-10-09 08:41:15 -04:00
Yuming Zhu
2956319c39 update docstr and do not swallow other errno 2019-09-30 15:33:01 +02:00
Yu Ming Zhu
589eb2dc9c [lib] ensuredir: normalize directory and don't throw error when dir exists 2019-09-30 15:33:01 +02:00
mprahl
a552a248db Allow ClientSession objects to get cleaned up by the garbage collector
Fixes #1652
2019-09-20 11:51:44 -04:00
Tomas Kopecek
16fb3ad162 enable dnf_warning in mock config
Fixes: https://pagure.io/koji/issue/1594
2019-08-12 18:02:36 -04:00
Tomas Kopecek
6fd33bfd1f use LANG=C for running tests comparing human-readable output 2019-06-26 15:58:48 -04:00
Mike McLean
37e8afcf8c support batch option in MultiCallSession 2019-06-17 10:19:12 -04:00
Mike McLean
78e3f48d8b expand unit test a little 2019-06-17 10:19:12 -04:00
Mike McLean
c06c34c529 stub unit test 2019-06-17 10:19:12 -04:00
Tomas Kopecek
b0863edb33 turn back on test skipped due to coverage bug
Fedora already fixed coverage bug preventing this test. Turning it back
on.

Fixes: https://pagure.io/koji/issue/1444
2019-05-31 20:19:02 -04:00
Tomas Kopecek
558e129c6b use same arch parsing for cli and hub
Related: https://pagure.io/koji/issue/1237
2019-05-21 18:39:52 -04:00
Tomas Kopecek
df11172629 fix str-type testing in fix_encoding
Fixes: https://pagure.io/koji/issue/1318
2019-05-21 12:18:19 -04:00
Tomas Kopecek
12cabb0f2c Remove 'keepalive' option
keepalive is not used anymore anywhere in koji

Fixes: https://pagure.io/koji/issue/1239
2019-03-12 10:34:36 -04:00
Tomas Kopecek
eeeeb3ab78 skip fixEncoding for py3 2019-03-04 10:13:51 -05:00
Mike McLean
b1ea2009f7 extend unit test a bit 2019-03-04 09:28:39 -05:00
Mike McLean
5d9c2f72b5 unit test for decode_bytes 2019-03-04 09:28:39 -05:00
Mike McLean
3b86d7f247 fix imports 2019-03-04 09:28:39 -05:00
Mike McLean
71bc4106b4 new base64 helper functions 2019-03-04 09:28:39 -05:00
Yu Ming Zhu
dc208d0555 fix invokings and unittests 2019-02-17 21:26:13 -05:00
Yu Ming Zhu
9ddae41877 using ConfigParser.read_file for PY3 2019-02-17 21:26:13 -05:00
Mike McLean
90700a65a5 fix unit test for localPath test 2019-02-12 16:11:27 -05:00
Yu Ming Zhu
30c2e5f426 sorted set in Error msgs of tasks.find_arch 2019-01-28 08:46:11 -05:00
Yu Ming Zhu
eb36620aa3 fix some unittests 2019-01-28 08:46:11 -05:00
Mike McLean
c60ec3c2f3 add a unit test 2019-01-15 10:51:19 -05:00
Tomas Kopecek
9963877545 move move_and_symlink to koji.util 2018-11-28 16:27:30 -05:00
Tomas Kopecek
8370a8e0ad don't fail on missing field in base policy tests
Fixes: https://pagure.io/koji/issue/1038
2018-11-28 09:01:20 +01:00
Yuming Zhu
cab5a01dcb move tests to test_lib/test_context.py 2018-11-22 18:43:31 +08:00
Tomas Kopecek
dfb692bc0a fix test 2018-08-16 13:36:07 -04:00
Tomas Kopecek
1886fe54a6 check rpm headers support directly 2018-08-16 13:36:07 -04:00
Tomas Kopecek
caae1a0a8b workaround unnecessary list conversions 2018-07-11 17:37:40 -04:00
Tomas Kopecek
7f6b717eb6 python-modernize -f libmodernize.fixes.fix_import 2018-07-11 17:37:39 -04:00
Tomas Kopecek
bcee24e50c python-modernize -f libmodernize.fixes.fix_dict_six 2018-07-11 17:37:39 -04:00
Tomas Kopecek
b96092334d python-modernize -f libmodernize.fixes.fix_xrange_six 2018-07-11 17:37:39 -04:00