Tomas Kopecek
5801ac8b13
tests: py3 versions compatibility fixes
2024-05-06 13:17:48 +02:00
Mike McLean
bf6e437df3
new cli tests for coverage
2024-04-24 14:47:57 +02:00
Mike McLean
eb18210744
fix unit tests
2024-04-24 14:47:57 +02:00
Mike McLean
2485b87294
more missing tearDowns
2024-04-15 11:08:29 +02:00
Mike McLean
f49ee80a7b
fix missing tearDown methods for numerous tests
2024-04-15 11:08:29 +02:00
Mike McLean
a807137c3c
rework DBQueryTestCase mocking
...
Mocking kojihub.kojihub.QueryProcessor doesn't affect other import
paths, e.g. in other kojihub modules
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
Mike McLean
1d0d4f2683
add unit tests and drop obsolete ones
2024-03-28 15:58:07 +01:00
Jana Cupova
63a6f43d8a
Fix remove-tag-inheritance with priority
...
Fix remote-tag-inheritance with priority
Fixes: https://pagure.io/koji/issue/3985
2024-03-26 15:11:24 +01:00
Mike McLean
60b71020f0
split out buildroot log watching logic
2024-03-13 10:09:15 +01:00
Jana Cupova
c62e3467b5
Add CLI with users with given permission
...
Fixes: https://pagure.io/koji/issue/3950
2024-03-11 13:12:20 +01:00
Mike McLean
c00e9b3c2e
unit test
2024-03-06 11:14:12 +01:00
Mike McLean
fbb24d631d
unit test
2024-03-05 13:22:58 +01: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
cfd6d3064f
show hub version in koji hello
2024-02-29 15:40:03 +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
Mike McLean
9517fb9ee1
more unit tests
2024-02-27 12:32:52 +01:00
Mike McLean
e0fea6a3b0
delete_rpm_sig: check header files first
...
also fixup some error logging and update unit tests
2024-02-21 12:28:56 +01:00
Mike McLean
f732aad509
Backup signature headers in delete_rpm_sig
2024-02-21 12:28:56 +01:00
Jana Cupova
d31750bf70
CLI list-users with filters from listUsers
...
Fixes: https://pagure.io/koji/issue/4001
2024-02-15 08:25:19 +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
Mike McLean
14863332fd
test_cg_importer.py: avoid creating temp files in checkout
2024-01-22 13:41:45 -05:00
Hector Martinez
d467810c7c
Read config file on image build indirection
2024-01-11 15:55:57 +01:00
Mike McLean
c944ef36a1
unit test for get_rpm preferences
2024-01-05 10:01:02 +00:00
Mike McLean
c5395a5a8f
fix unit tests
...
- adjustments for query updates
- draft data no longer in build.extra
- drop some unhelpful assertions
2024-01-05 10:01:02 +00:00
Yu Ming Zhu
6997097392
fix tests
2024-01-05 10:00:58 +00:00
Yu Ming Zhu
8a64c93d05
promoteBuild: reformat error messages
2024-01-05 10:00:54 +00:00
Yu Ming Zhu
3dbe136187
promoteBuild: remove strict option
2024-01-05 10:00:53 +00:00
Yu Ming Zhu
e32c71c100
remove draft opts in import_build and completeBuild
2024-01-05 10:00:52 +00:00
Mike McLean
af36318ead
refactor get_rpm
2024-01-05 10:00:50 +00:00
Yu Ming Zhu
34c6712fde
simpler gen_draft_release and parse_target_release
2024-01-05 10:00:47 +00:00
Yu Ming Zhu
08a2d6c389
revert tests/test_cli/test_import.py
2024-01-05 10:00:39 +00:00
Yu Ming Zhu
f29e5e143e
parse target_release from draft release instead of extra.draft.target_release
2024-01-05 10:00:38 +00:00
Yuming Zhu
0859f1ba89
promoteBuild: update volume based on volume policy
2024-01-05 10:00:36 +00:00
Yu Ming Zhu
44d59ecbc7
can only promote COMPLETE draft build
2024-01-05 10:00:35 +00:00
Yuming Zhu
6fe42b6212
cil wrapper-rpm: input check and more reasonable opt --create-draft
2024-01-05 10:00:35 +00:00
Yuming Zhu
c045bc7100
promoteBuild: split main function to _promote_build
2024-01-05 10:00:34 +00:00
Yu Ming Zhu
77a06c98b3
draft filter opt: use bool/None instead of bit flag
2024-01-05 10:00:33 +00:00
Yu Ming Zhu
8a34f7efa0
promote-build command
2024-01-05 10:00:32 +00:00
Yuming Zhu
3ff5eaadd6
misc fixes
2024-01-05 10:00:30 +00:00
Yuming Zhu
87409499a3
draft builds
2024-01-05 10:00:29 +00:00
Jana Cupova
ce624342d8
Fix unittests for python-mock-5.x
...
Fixes: https://pagure.io/koji/issue/3967
2024-01-02 13:06:22 +01:00
Yu Ming Zhu
7b1f2a6137
cli: [list-permissions] backward compatibility for getUserPermsInheritance call
...
fixes : #3959
2023-12-08 23:52:39 +00:00
Tomas Kopecek
abe0bc47fb
Fix test
...
Test was not mocking properly log calls, creating log file at local
filesystem.
2023-12-08 11:16:36 +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