Jimmy Berry
72409c5432
tests/origin_tests: provide split product origin tests.
2019-11-04 14:18:12 -06:00
Jimmy Berry
ad0d0b28ea
tests/origin_tests: provide devel origin tests.
2019-11-04 14:18:12 -06:00
Jimmy Berry
43850242cf
tests/origin_tests: provide harness and basic tests.
2019-11-04 14:18:12 -06: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
0cb54b8be0
Add a dummy user/password to the openSUSE:Factory section
...
See https://github.com/openSUSE/osc/issues/667 - we might want to remove
the feature to override settings locally this way and stop mangling with
osc's config file
2019-11-04 11:59:33 +01: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
f741cdc4e6
New basic test case
2019-09-03 19:43:15 +02:00
Stephan Kulow
700cf1e41a
Fix repository_path_expand to also work in Factory stagings
...
I got the algorithm wrong - it overwrites repositories only when used
in the same path, not by recursion
2019-05-12 22:35:59 +02:00
Stephan Kulow
7ee9614ac2
Merge pull request #2002 from coolo/repository_fix
...
Fix and test repository_path_expand on SLE12-SP5
2019-05-11 16:49:16 +02: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
d57ba61df5
Remove more references to vcr
...
I tried to replace the Mocking of functions with httpretty, but
unfortunately httpretty replaces all other API calls with 404s then.
What we'd need is a library sniping out single requests - possibly
by mocking the http_GET function, but that's tricky as well with
caching already overwriting it
2019-05-11 10:26:35 +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
70dd0ef20f
Simplify httpretty usage
...
Don't pass regexps but real URLs, otherwise the matching won't work.
On travis and leap 15.1 we have httpretty 0.9.5 which won't uncover
the problem, but on Tumbleweed we have 0.9.6 that shows it
2019-05-05 10:49:05 +02:00
Stephan Kulow
58d6d7ca16
Python3 fixes
2019-05-04 15:44:44 +02:00
Stephan Kulow
3b568a60dd
Create fixtures for devel_project_tests
2019-05-04 15:44:44 +02:00
Stephan Kulow
767f3e453b
Fix comment_tests to create fixtures
2019-05-04 15:44:44 +02:00
Stephan Kulow
a4614ac13e
Create user before using it
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
5721cee783
Create a real staging setup for freeze tests
...
If it's an empty project only we're freezing, the backend 'remembers' the
mtime of previous versions of the project (delete only marks it for undelete,
so creating a new empty project is just deleting this mark and as such doesn't
change the mtime).
So we need to have a new wine package with fresh content to change mtime
during freeze
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
Stephan Kulow
8a7b65d505
Remove fake OBS in favor of using generated test data
2019-05-04 15:44:39 +02:00
Stephan Kulow
09332504d4
Merge pull request #1968 from coolo/python3_cherry_picks
...
Python3 cherry picks
2019-05-02 07:59:22 +02:00
Jimmy Berry
11921d78ba
osclib/pkgcache: drop as no more uses.
...
No longer works in python3.
2019-04-30 08:39:18 -05:00
Stephan Kulow
c11313b2dc
Fix imports, python3 doesn't import from .
2019-04-30 14:29:16 +02:00
b4083b0861
Merge pull request #1958 from Vogtinator/containercleaner
...
Add program for cleaning up maintenance_release projects for containers
2019-04-24 13:53:07 +02:00
Stephan Kulow
595e84191e
More porting to python3
...
Travis changed default python to 3.6, which has impact on the way
flake8 checks. So make sure we run fine under flake8 of python 3
2019-04-20 21:16:50 +02:00
e943e27620
More tests in container_cleaner_tests.py
2019-04-17 17:03:59 +02:00
87c74d8451
Add program for cleaning up maintenance_release projects for containers
...
Only those containers providing binaries to the latest five version for each
archs are kept, all others are deleted.
2019-04-16 18:16:47 +02:00
Jimmy Berry
7bc6a10cc1
tests/obs: provide offering to appease the re-implementation of OBS.
2019-02-15 14:21:49 -06:00
Jimmy Berry
1abca4088a
tests/metrics: add basic test to ensure code is executable.
2018-11-28 18:56:33 -06:00
86732dc472
ttm: add minimal staging config for pseudometa package
...
The config default for pseudometa package (00Meta) does not
exist for Tumbleweed, so we need to add an override for :ARM
to contain the proper information so that the publishing
logic doesn't stop. Also update correspondingly for Leap
2018-11-26 10:51:51 +01:00
Stephan Kulow
cedff89286
Replace urlparse.urlparse for python3
2018-11-17 10:51:36 +01:00
Stephan Kulow
ea9061ccf5
Import urllib2 python agnostic
2018-11-16 09:01:45 +01:00
Stephan Kulow
a0c9375a92
Adapt the unselect test to the current state
...
There are no revoked requests in Factory today - not perfect, but writing
this json file manually is not perfect either
2018-11-11 19:42:08 +01:00
Stephan Kulow
41a0c3902c
Disable DEBUG for obs requests, it makes reading test failures very hard
2018-11-11 19:42:08 +01:00
Stephan Kulow
e1711a2812
Support OBS checks instead of openqa
...
Updated the test fixtures to current state, so we
don't test on old data
2018-11-11 19:42:08 +01:00
Jimmy Berry
4c8ade1a93
flake8: utilize raw strings to avoid invalid escape character warnings.
2018-10-24 16:34:16 -05:00