Mike McLean
48d78bd535
more mock.patch cleanup
2024-06-04 12:54:58 +02:00
Tomas Kopecek
5801ac8b13
tests: py3 versions compatibility fixes
2024-05-06 13:17:48 +02:00
Mike McLean
2485b87294
more missing tearDowns
2024-04-15 11:08:29 +02:00
Mike McLean
4dd0e24b00
correct a few comment lines
2024-04-10 11:20:15 +02:00
Mike McLean
ce4718f1fb
fix samefile check and relative path test
2024-04-10 11:20:15 +02:00
Mike McLean
e8ae18fcc8
Align our cwd tracking with os
2024-04-10 11:20:15 +02:00
Mike McLean
c0917955c0
more testcases
2024-04-10 11:20:15 +02:00
Mike McLean
4fddafc54d
rmtree: use fork
...
These changes work around a thread safety issue in our rmtree
implementation, which uses chdir to traverse the directory tree.
Using chdir resolves issues deleting paths longer than PATH_MAX, but
makes the code inherently unsafe in a threaded environment.
Now, the main rmtree function uses fork to perform the actions in a
dedicated process.
To avoid possible locking issues with the logging module, we introduce a
simple proxy logger for the subprocess.
Fixes: https://pagure.io/koji/issue/3755
For historical context see:
https://pagure.io/koji/issue/201
https://pagure.io/koji/issue/2481
https://pagure.io/koji/issue/2714
2024-04-10 11:20:15 +02:00
Tomas Kopecek
4ad92b5cd6
Use dnf5-compatible "group install" command
...
* yum knows only "yum groupinstall"
* dnf < 5 knows both
* dnf-5 only "dnf5 group install"
From RHEL5 version of yum, @group syntax is supported, so we can
replace all groupinstall commands with "install @group".
Related: https://pagure.io/koji/issue/3971
2024-03-05 13:17:35 +01:00
Mike McLean
62f279ad43
move version fetching to hub_version_str property
2024-02-29 15:40:03 +01:00
Tomas Kopecek
7a9b0561eb
Don't try to resolve server version for old hubs
...
Related: https://pagure.io/koji/issue/3890
2024-02-29 15:40:03 +01:00
Tomas Kopecek
2013692fc9
New scmpolicy plugin
...
Plugin for scm policy using data from SCM checkout.
Related: https://pagure.io/koji/issue/3968
2024-02-09 14:47:37 +01:00
Tomas Kopecek
41869961f6
Remove six.configparser.SafeConfingParser from tests
...
Fixes: https://pagure.io/koji/issue/3939
2023-11-09 13:58:53 +01:00
Tomas Kopecek
0c58cd954d
Retrieve task_id for older OSBS builds
...
Related: https://pagure.io/koji/issue/3906
2023-10-23 14:24:16 +02:00
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