292 Commits

Author SHA1 Message Date
Jimmy Berry
03a954aebd
Merge pull request #2307 from jberry-suse/origin-manager-automatic-updates-initial-blacklist
osclib/origin: origin_update(): support blacklist patterns for initial updates.
2019-11-08 15:43:46 -06:00
Jimmy Berry
5f937588e6 osclib/origin: origin_update(): support blacklist patterns for initial updates. 2019-11-08 13:19:04 -06:00
Jimmy Berry
d02f06898c origin-manager: indicate the decision may be overridden via command. 2019-11-07 15:39:23 -06: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
Jimmy Berry
e771dc653f osclib/origin: provide automatic update mode controls. 2019-11-07 08:46:02 -06:00
Jimmy Berry
931b760456
Merge pull request #2287 from jberry-suse/origin-manager-new-package-submission
origin-manager: submit new packages from origins with automatic_updates_initial enabled.
2019-11-05 09:04:01 -06:00
Jimmy Berry
2b68e743df tests/origin_tests: provide test for new package submission. 2019-11-05 08:23:40 -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
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