Commit graph

69 commits

Author SHA1 Message Date
Yuming Zhu
ca05418fb5 unittest: use unittest.mock instead of mock
because the absence of unittest.mock on python2.7, we still fallback to
mock
2024-10-23 16:35:30 +00:00
Tomas Kopecek
8d0ef68bfa Basic tests for kiwi plugin
Related: https://pagure.io/koji/issue/4179
2024-08-28 15:54:17 +02:00
Mike McLean
e3707bed7a use requests in sidetag plugin 2024-06-24 11:25:21 -04:00
Mike McLean
48d78bd535 more mock.patch cleanup 2024-06-04 12:54:58 +02: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
7afa72a60d fix tests 2023-07-13 17:03:23 +02:00
Jana Cupova
b87cbb2fda Increase sidetag CLI tests
Related: https://pagure.io/koji/issue/3723
2023-05-09 09:27:07 +02:00
Jana Cupova
2139b237d0 ArgumentParser instead of ArgumentParser in sidetag CLI plugin
Fixes: https://pagure.io/koji/issue/3739
2023-04-03 15:23:21 +02:00
Jana Cupova
889770e74c Fix editSidetag fstring variable formats and fix test unit tests
Fixes: https://pagure.io/koji/issue/3748
2023-03-24 11:40:44 +01:00
Jana Cupova
c8bcb496d4 Increate sidetag hub unit tests 2023-03-23 14:01:41 +01:00
Jana Cupova
693f196fa4 Add missing argument in edit-sidetag help msg
Fixes: https://pagure.io/koji/issue/3717
2023-03-02 16:07:04 +01:00
Jana Cupova
fd9239cba0 Add test cases for help
Fixes: https://pagure.io/koji/issue/3651
2023-01-09 11:02:30 +01:00
Jana Cupova
d67c36151b Fix input validation
Fixes: https://pagure.io/koji/issue/3319
2022-05-09 14:05:52 +02:00
Tomas Kopecek
04da1d2db3 additional fixes 2022-05-02 06:55:46 +02:00
Jana Cupova
9bfefe782e Hub, plugins and tools inputs validation
Fixes: https://pagure.io/koji/issue/3319
2022-05-02 06:55:44 +02:00
Ken Dreyer
dbacf1f985 protonmsg: allow users to specify router-specific topic prefixes
Prior to this change, Koji would always send messages with a hard-coded
topic:// prefix.

This works fine for ActiveMQ 5 and Artemis, but RabbitMQ does not
support that syntax. Instead, RabbitMQ brokers expect clients to use
topic addresses with a "/topic/" prefix.

The RFE for RabbitMQ to support "topic://" prefixes is
https://github.com/rabbitmq/rabbitmq-server/issues/2583

In the meantime, allow users to specify "topic://" or "/topic/"
explicitly in their configuration.

For backwards-compatibility, if the user chose neither "topic://" nor
"/topic/", prepend the "topic://" string, preserving the plugin's
existing behavior.

(Note: ActiveMQ 5 advertises its expected topic:// prefix in the initial
connection properties, so we could read that value dynamically, but
RabbitMQ and Artemis do not send an expected topic prefix connection
properties, so we just make the user choose explicitly here.)
2021-12-20 08:44:27 +01: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
00c0a2326b fix test 2021-11-18 11:28:33 +01:00
Tomas Kopecek
8cc777c094 fix test 2021-10-20 15:20:14 +02:00
Tomas Kopecek
ba2e1e520b basic security checks with bandit
Fixes: https://pagure.io/koji/issue/3042
2021-10-20 15:20:14 +02:00
Tomas Kopecek
c41559f1e9 move btypes from headers to body of proton message
Fixes: https://pagure.io/koji/issue/3017
2021-09-14 09:28:21 +02:00
Jana Cupova
e689602be5 Add btype to protonmsg
Fixes: https://pagure.io/koji/issue/1217
2021-07-20 10:36:53 +02:00
Tomas Kopecek
61f85acde8 basic test 2021-06-03 15:23:56 +02:00
Mike McLean
4b55b62355 fix unit tests 2021-05-10 09:51:03 +02:00
Jana Cupova
6a2c6e7586 Repo info with task id
Fixes: https://pagure.io/koji/issue/888
2021-04-19 15:15:10 +02:00
Tomas Kopecek
c6e69b4f8b backport py27 compatible file open with encoding
client and builder needs to run on py27 which doesn't support
open(encoding='utf-8')

Related: https://pagure.io/koji/issue/2641
2021-02-16 14:13:03 +01:00
Tomas Kopecek
b030b46f74 remove unittest2 2020-10-06 15:00:23 +02:00
Tomas Kopecek
bc478c2d68 cli: show log urls for failed tasks
Fixes: https://pagure.io/koji/issue/2188
2020-10-02 12:44:07 -04:00
Tomas Kopecek
8c253396e8 proton: persistent message queue
Fixes: https://pagure.io/koji/issue/2230
2020-09-30 10:14:49 +02:00
Tomas Kopecek
475bf17f05 fix tests 2020-03-30 15:10:30 +02:00
Tomas Kopecek
d1e055f1b2 limit size of extra field in proton msgs
Fixes: https://pagure.io/koji/issue/2017
2020-03-25 09:07:15 +01:00
Tomas Kopecek
e016e6624d Emit user in PackageListChange messages
Fixes: https://pagure.io/koji/issue/1035
2020-02-04 09:22:43 +01:00
Yu Ming Zhu
153ac4058d fix test_runroot_builder tests 2019-10-15 09:14:16 +02:00
Tomas Kopecek
167eba3394 fail runroot task on non-existing tag
Fixes: https://pagure.io/koji/issue/1139
2019-05-22 13:12:19 -04:00
Mike McLean
9bcc710c7e drop unused import in unit test 2019-03-04 09:57:15 -05:00
Mike McLean
89b6c01c47 fix unit test for runroot cli plugin 2019-03-04 09:57:15 -05:00
Tomas Kopecek
aefb2ddba7 fix py3 tests compatibility 2019-02-19 17:29:25 -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
Tomas Kopecek
15872b6c2c fix runroot test 2019-02-12 16:09:19 -05:00
Tomas Kopecek
be535c2854 python-modernize -f libmodernize.fixes.fix_imports_six 2018-07-11 17:37:39 -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
c68396c059 Use unittest2 for rhel6 compatibility
Fixes: https://pagure.io/koji/issue/830
2018-06-07 09:39:39 -04:00
Mike McLean
1bf3bd22d7 protonmsg: unit test for unencodable data 2018-03-21 15:08:26 -04:00
Tomas Kopecek
3bfcc6a66e json serialize additional types in protonmsg
Fixes: https://pagure.io/koji/issue/741
2018-03-21 15:08:26 -04:00
Mike McLean
cfca804acd fix unit test 2018-02-28 08:19:29 -05:00
Tomas Kopecek
eaa158ab51 honour runroot --quiet for old-style call
Fixes: https://pagure.io/koji/issue/807
2018-02-19 12:26:45 -05:00
Tomas Kopecek
e040745181 use six.StringIO everywhere 2017-11-09 17:27:23 -05:00
Tomas Kopecek
f639b99a71 more runroot tests
Related: https://pagure.io/koji/issue/641
2017-10-30 13:20:37 +01:00