Tomas Kopecek
f5f8e6c6a2
refactor get_user_perms
2023-09-04 09:16:21 +02:00
Tomas Kopecek
e1ea85f184
getUserPermsInheritance
2023-09-04 09:16:21 +02:00
Tomas Kopecek
255ec21d00
Inherit group permissions
...
Related: https://pagure.io/koji/issue/3849
2023-09-04 09:16:21 +02:00
Tomas Kopecek
1f06c98fda
fix tests
2023-08-28 13:04:50 +02:00
Mike McLean
6455974fd5
adjust unit tests for new args
2023-05-17 09:35:11 +02:00
Jana Cupova
44742bc5f8
Drop default Null for renew_time in sql
2023-05-09 09:16:40 +02:00
Jana Cupova
ce0ce20e3a
Add renewal session timeout
...
Fixes: https://pagure.io/koji/issue/3596
2023-05-09 09:16:40 +02:00
Mike McLean
54996d9e63
fix unit test
2023-03-23 13:20:06 +01:00
Mike McLean
106ccbcde5
single opt for get, plus simple unit test
2023-03-23 13:20:06 +01:00
Mike McLean
aebff00673
unit test: more closely mimic rpm2cpio behavior when reading past header
2023-03-14 11:08:16 +01:00
Mike McLean
accdeb3c63
unit test: close fd
2023-03-14 11:08:16 +01:00
Mike McLean
85ea7bd736
unit test
2023-03-14 11:08:16 +01:00
Tomas Kopecek
7ceffe391c
unify relative imports
2023-03-01 11:46:24 +01:00
Tomas Kopecek
b0e91e378c
Move db/auth to kojihub module
...
Related: https://pagure.io/koji/issue/3666
2023-03-01 11:46:24 +01:00
Mike McLean
24cf0a6a4c
simple unit tests for splicing code
2023-02-06 13:17:33 +01:00
Tomas Kopecek
c51802f2ea
use_fast_upload=True as default everywhere
...
Related: https://pagure.io/koji/issue/3529
2023-02-03 09:28:40 +01:00
Tomas Kopecek
c1cc63e25b
fix tests
2023-02-01 15:01:15 +01:00
Jana Cupova
a1940470cf
Fix unit tests
2023-02-01 15:01:15 +01:00
Jana Cupova
0e07429d66
Create new session when old session was timeout
...
Fixes: https://pagure.io/koji/issue/3394
2023-02-01 15:01:15 +01:00
Jana Cupova
07332041eb
Fix auth unit tests
2023-01-20 09:47:44 +01:00
Tomas Kopecek
4c4f2c0496
fix tests
2022-11-10 11:07:03 +01:00
Jana Cupova
7897628159
Add active sessions web page
...
Fixes: https://pagure.io/koji/issue/3396
2022-11-10 10:17:51 +01:00
Jana Cupova
40de4f3df0
Rewrite Query DB to Processors in auth.py
...
Fixes: https://pagure.io/koji/issue/3559
2022-11-08 12:11:34 +01:00
Tomas Kopecek
22b781ad58
kojid: fix restartHosts on py 3.5+
...
Related: https://pagure.io/koji/issue/3442
2022-10-31 11:58:37 +01:00
Tomas Kopecek
2daa71614e
fix tests according to pytests warnings
2022-10-24 10:40:50 +02:00
Jana Cupova
3999667a8c
Fix Makefile for RHEL7
2022-10-11 14:29:05 +02:00
Jana Cupova
1cfe6538db
Move database classes and functions from kojihub.py to koji/db.py
...
Move QueryProcessor, InsertProcessor, UpdateProcessor,
BulkInsertProcessor, _applyQueryOpts, get_event, _dml,
_fetchMulti, _fetchSingle, _singleValue, _multiRow, _singleRow
Update koji-sweep-db script to DB Processors
Fixes: https://pagure.io/koji/issue/3466
2022-10-11 14:29:05 +02:00
Jana Cupova
9287f672ee
Parse_arches allows string and list of arches
...
Fixes: https://pagure.io/koji/issue/3434
2022-08-17 10:42:49 +02:00
Otto Urpelainen
f48d6d2b71
Add unit test for buildLabel
2022-08-01 15:33:29 +02:00
Jana Cupova
44f5ebaabb
Authtype as enum and getSessionInfo prints authtype name
...
Fixes: https://pagure.io/koji/issue/3436
2022-07-26 14:36:00 +02:00
Tomas Kopecek
9e741bfb9e
beautify logged commands issued by koji
...
Related: https://pagure.io/koji/issue/929
2022-07-19 13:23:57 +02:00
Tomas Kopecek
1652dcc606
improved sensitive values handling (requests/urllib3)
...
Related: https://pagure.io/koji/issue/3246
2022-05-16 16:19:33 +02:00
Jana Cupova
f42c1aa863
Add as_string option to showOpts for raw string or dict output
...
Fixes: https://pagure.io/koji/issue/3312
2022-05-03 12:47:47 +02:00
Tomas Kopecek
30af3a6bf5
fix test
2022-03-29 12:28:17 +02:00
Jana Cupova
c310d6692d
Pytest instead of nose in unittest
...
Fixes: https://pagure.io/koji/issue/3140
2021-12-06 12:17:29 +01:00
Tomas Kopecek
09a8fd71e5
backward compatibility for older hub
...
use proxyauthtype only if it is explicetly requested. Older hubs
don't know this option and will refuse login attempt.
2021-11-04 12:07:05 +00:00
Tomas Kopecek
252121c11f
propagate proxyauthtype in login calls
2021-11-04 12:07:05 +00:00
Tomas Kopecek
c587eb81bf
Fix tests on centos 8
...
Fixes: https://pagure.io/koji/issue/2924
2021-06-22 13:17:10 +02:00
Jana Cupova
9541c2a173
importlib instead of imp
...
Fixes: https://pagure.io/koji/issue/2822
2021-06-02 11:19:33 +02:00
Jana Cupova
de008b5f27
Add kerberos debug message
...
Fixes: https://pagure.io/koji/issue/2063
2021-05-03 13:41:35 +02:00
Tomas Kopecek
c732f49ac8
fix tests
2021-04-26 14:43:20 +02:00
Tomas Kopecek
ef3e2cd04b
lib: use parse_task_params for taskLabel
...
Fixes: https://pagure.io/koji/issue/2519
2021-04-26 14:43:20 +02:00
Mike McLean
362c3e5cc6
more rmtree unit tests
2021-03-18 15:46:16 +01:00
Mike McLean
08139a9e39
update unit tests
2021-03-18 15:46:16 +01:00
Tomas Kopecek
96ae0ecef5
explicit encoding for text file operations
...
Fixes: https://pagure.io/koji/issue/2641
2021-01-26 13:36:25 +01:00
Tomas Kopecek
8ff5759b21
lib: better argument checking for eventFromOpts
...
Fixes: https://pagure.io/koji/issue/2513
2021-01-04 10:43:30 +01:00
Tomas Kopecek
b030b46f74
remove unittest2
2020-10-06 15:00:23 +02:00
Yu Ming Zhu
52a63f732d
util: [rmtree] try best to catch errors for race condition
...
fixes : #2481
This approach is ugly, but just working.
ENOENT and ESTALE errors are catched in `chdir`, `listdir` calls to stomach the deletion by other process/thread
ENOTEMPTY is catched when calling `os.rmdir(path)` in `rmtree()` too. It happens when `path` is on an NFS like where ESTALE happens.
2020-10-05 10:14:34 +02:00
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