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
Jimmy Berry
69a02fde86
tests/OBSLocal: rework OSCRC handling to use non-default file.
2017-10-24 18:05:38 -05:00
Jimmy Berry
c5cf186d18
tests/OBSLocal: add workaround for obs.py leakage.
2017-10-24 18:00:47 -05:00
Jimmy Berry
35bbaf3a66
tests/OBSLocal: provide based class for testing against local OBS.
2017-10-24 17:52:42 -05:00