64 Commits

Author SHA1 Message Date
Stephan Kulow
5df665ccc5 Targeting E123 - Closing bracket does not match indentation
https://www.flake8rules.com/rules/E123.html
2022-02-18 15:52:47 +01:00
Stephan Kulow
f705a24db1 Only have one statement in a line E701
https://www.flake8rules.com/rules/E701.html
2022-02-18 13:42:57 +01:00
Stephan Kulow
1152d4c419 Remove bare excepts - https://www.flake8rules.com/rules/E722.html
The bare except in osc-credentials lead me to remove it and the scripts
using it
2022-02-18 12:03:56 +01:00
Josef Reidinger
8bef4c3cf2
check_source: Fix revert case for patch detection (fix#2640) 2021-09-23 10:58:23 +02:00
Stephan Kulow
a8f7146baf Remove E713 offense from flaker 2021-09-21 14:20:08 +02:00
Ancor Gonzalez Sosa
6540e8baad Test to showcase a submit request to SLE 2021-09-16 16:47:09 +02:00
Ancor Gonzalez Sosa
2213e2c89c Fix typo in documentation 2021-09-16 14:59:11 +02:00
Ancor Gonzalez Sosa
3d466b2b19 OBSLocal: functions to easily manage several review bots 2021-09-15 15:55:16 +02:00
Ancor Gonzalez Sosa
c9ff2171c3 OBSLocal: rename assertReviewBot to assertReviewScript
The function fully relies on the content of the script attribute and all other
functions that do so contain "script" in the name instead of "bot".
2021-09-15 15:08:11 +02:00
Ancor Gonzalez Sosa
8c1cac7d76 OBSLocal: improve documentation about scripts and asserts 2021-09-15 15:07:41 +02:00
Ancor Gonzalez Sosa
d31398e85a OBSLocal: small reorganization 2021-09-09 20:58:26 +02:00
Ancor Gonzalez Sosa
7f377f082f Extract useful stuff to a base OBSLocal.StagingWorkflow class 2021-09-09 20:58:26 +02:00
Ancor Gonzalez Sosa
ca3eb87931 OBSLocal: clarify some aspects of attributes management 2021-09-09 20:58:17 +02:00
Ancor Gonzalez Sosa
28c771927a Rename OBSLocal.StagingWorkflow to OBSLocal.FactoryWorkflow 2021-09-09 15:07:34 +02:00
José Iván López González
c74900f3b9 Create ProductVersion attribute 2021-09-07 13:17:04 +01:00
José Iván López González
352ce10c24 Remove attributes when destroying a workflow 2021-09-07 13:16:57 +01:00
Ancor Gonzalez Sosa
827ecacf45 Test to showcase a submit request to Factory 2021-08-19 16:29:24 +02:00
Ancor Gonzalez Sosa
b188340266 OBSLocal: top-level classes documentation to clarify the scope 2021-08-05 12:16:22 +02:00
Martin Vidner
b536914570 Point to osc.core to compare the APIs 2021-08-05 10:59:52 +02:00
Martin Vidner
73b91a6668 More improvements in the OBSLocal.py documentation 2021-08-05 10:18:25 +02:00
Martin Vidner
de330e42b3 In OBSLocal.StagingWorkflow.submit_package, package may not be None
did not make sense; i've checked all call sites
2021-08-05 10:17:33 +02:00
Ancor Gonzalez Sosa
f85c1b46b6 Some convenience extensions to OBSLocal 2021-08-04 17:25:46 +02:00
Ancor Gonzalez Sosa
038bfef67b OBSLocal: improved management of meta 2021-08-03 13:00:01 +02:00
Ancor Gonzalez Sosa
db9dbd4ecb Improvements in the OBSLocal.py documentation 2021-08-03 12:55:05 +02:00
Ancor Gonzalez Sosa
ab1baf665d Convert OBSLocal documentation to reStructured Text 2021-08-03 12:55:05 +02:00
Josef Reidinger
f16c803e7c document OBSLocal.py 2021-08-03 12:55:05 +02:00
Stephan Kulow
f28b520a92 Wipe all multibuild flavors for delete requests
Fixes #1899
2020-03-25 16:07:19 +01:00
Stephan Kulow
0cef959328 Work around OBS issue 8994
Instead of declining the by_project review, unselect the request and
decline the group review. This way we avoid the OBS problem
2020-03-18 22:40:47 +01:00
ec88760187 Fix Flake E241
One more step towards white space sanity. Next group is E20x.
2019-12-10 08:46:02 +01:00
32ad0adc2d Fix all E22x errors
This cleans up white spaces around various kinds of operators to be
consistent.
2019-11-27 11:08:06 +01:00
Stephan Kulow
8c5ee9257f Fix for frozen_enough test 2019-11-20 16:10:30 +01:00
Stephan Kulow
12d6b22895 Setup staging workflow in tests 2019-11-19 08:04:11 +01:00
Jimmy Berry
c34a58061b tests/OBSLocal: randomString() use fixed length of 2.
Reduce random consumption as test environment lacks input.
2019-11-07 10:16:17 -06:00
Jimmy Berry
57ebf5a5fe tests/OBSLocal: Request: print message once created. 2019-11-07 10:16:17 -06:00
Stephan Kulow
31ee1047cd Remove dependency from cache to config
Getting the right config depends on too many things that cache.py can't
know - so just rely on environment variables instead

Fixes #2289
2019-11-05 11:29:04 +01:00
Jimmy Berry
5a5d60b5f6 tests/OBSLocal: provide randomString() for ensuring tools not name dependent. 2019-11-04 14:18:12 -06:00
Jimmy Berry
e7d8c9857e tests/OBSLocal: provide assertReviewBot() for review script workflows. 2019-11-04 14:18:12 -06:00
Jimmy Berry
8ec2202763 tests/OBSLocal: submit_package(): provide optional project argument.
Generating submit requests beyond only against the target project is
important during testing.
2019-11-04 14:18:12 -06:00
Jimmy Berry
e33716866f tests/OBSLocal: StagingWorkflow: provide and utilize remote_config_set(). 2019-11-04 14:18:12 -06:00
Jimmy Berry
1c216fc13a tests/OBSLocal: Request: extract change_state() from revoke.
Changing request state is an import part of testing beyond just revoking.
2019-11-04 14:18:12 -06:00
Jimmy Berry
3c1b01695e tests/OBSLocal: tearDown(): ensure user is Admin before cleanup.
Without this all cleanup fails which can cause leakage between test runs
that utilize the same entity names.
2019-11-04 14:18:12 -06:00
Jimmy Berry
65e23771b6 tests/OBSLocal: StagingWorkflow: stop hiding valid errors.
Makes for debugging issues quite a pain.
2019-11-04 14:18:12 -06:00
Jimmy Berry
5cc14d1841 tests/OBSLocal: correct python 3 port attempt for subprocess output handling.
Newlines are lost in previous port which makes output nearly useless.
2019-11-04 14:18:12 -06:00
Jimmy Berry
acd552c807 tests/OBSLocal: provide osc_user_pop() to make user switching cleaner. 2019-11-04 14:18:08 -06:00
Jimmy Berry
6e1c37b53d tests/OBSLocal: osc_user(): indicate when switching user. 2019-11-04 14:01:34 -06:00
Jimmy Berry
da2e5ea9a8 tests/OBSLocal: disable request cache during testing. 2019-11-04 14:01:34 -06:00
Jimmy Berry
251170b77d osclib/core: provide request_state_change() and utilize. 2019-11-04 14:01:34 -06:00
Jimmy Berry
caabf42f2b osclib/cache: provide osrt.cache.disable config option to disable cache.
Necessary for writing involved tests since the assumptions made by the
cache are violated and thus cause problems.

To keep the tests passing the oscrc intended to be used must be set as
environment variable so when osclib.conf.Config is use the config is not
lost. This would be made simpler without the needless extra config added
by StagingWorkflow.
2019-11-04 14:01:19 -06:00
Stephan Kulow
fe4f121993 Make exceptions easier to debug in OBSLocal
If the init function fails due to exceptions, python still
shows exceptions caught in the __del__ function, which can
be very confusing. So avoid the destructor if the constructor
failed by setting the variables early on and return in the
destructor if self.api is not yet defined
2019-11-04 11:04:53 +01:00
Stephan Kulow
4db9df6aec Fix and test repository_path_expand on SLE12-SP5
The way OBS collapses repositories is different to what we did
2019-05-11 16:34:31 +02:00