53 Commits

Author SHA1 Message Date
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
Stephan Kulow
925032e0f9 Redo select tests to test package with multiple spec files 2019-05-06 22:38:57 +02:00
Stephan Kulow
9dcb403753 Merge vcrhelpers into OBSLocal
There are no more vcrs only a local OBS - even if not exported to
localhost
2019-05-05 10:49:05 +02:00
Stephan Kulow
58d6d7ca16 Python3 fixes 2019-05-04 15:44:44 +02:00
Stephan Kulow
0e00c83f09 Rename OBSLocal.OBSLocalTestCase to OBSLocal.TestCase
And make use of it in the vcrhelper using tests
2019-05-04 15:44:44 +02:00
Stephan Kulow
8ba4e2fb84 Run the nosetests in a tumbleweed container instead of travis environment
The docker-compose file starts an OBS instance (on 15.0 atm) and runs
the test suite in a test container (tumbleweed), so all tests run in
an isolated environment accessing OBS at api:3000
2019-05-04 15:44:39 +02:00
Jimmy Berry
df8cd0f677 tests/OBSLocal: re-parse config and reset authentication when changing user.
Previously, the user was changed, but the authentication not reset. For
osc.core calls made within the text context they would still run as Admin
while separate processes (like scripts) would run as the desired user. As
such this was not an issue before since only scripts were meant to run as
a different user.
2018-01-03 16:22:13 -06:00
Jimmy Berry
f1462def6e tests/OBSLocal: setup test separate cookiejar. 2018-01-03 16:19:28 -06:00
Jimmy Berry
e3150a7626 tests/OBSLocal: invoke scripts using coverage to include in report. 2017-10-24 18:06:33 -05:00
Jimmy Berry
e0491e3aae tests/OBSLocal: split out execute() to provide osc and generic versions. 2017-10-24 18:05:48 -05:00
Jimmy Berry
476fbcd818 tests/OBSLocal: include assertOBS() to clarify OBS status before test.
Otherwise, end up with first OBS call in test failing which does not make
the issue as clear to understand.
2017-10-24 18:05:48 -05:00
Jimmy Berry
6faebca998 tests/OBSLocal: add email and include spaces in generated oscrc file. 2017-10-24 18:05:48 -05:00