265 Commits

Author SHA1 Message Date
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
Stephan Kulow
ff84b79171 We need the images repo published to have a status check
We can't generally assume ISOs can be fetched from backend (we can't
have this on IBS), so publish it - and disable the actual publishing
on the staging backend of OBS
2018-10-12 13:00:18 +02:00
Stephan Kulow
e6bf5ccb7b Do no longer CC submitters in request comments
Submitters complain more and more about the spam they're getting from
staging projects - and we rather leave that weapon for actual feedback.

One especially annoying case is if a package is added to one staging project
and then later moved to another, the submitter will receive notifications
of all kind of bots and actions for both staging projects.
2018-10-04 09:52:49 +02:00
Jimmy Berry
d74c1c69ff osclib/cache_manager: rework base directory handling.
Ensure the returned directory is always created and while continuing to
handle test mode.
2018-09-13 20:26:08 -05:00
Jimmy Berry
c47bb4c902 Utilize CacheManager for all existing caches. 2018-09-04 15:19:02 -05:00
Jimmy Berry
d1274ecd1b tests/factory_source_tests: update query after osc@f1c3156.
Drop submit xpath references in favor of action only. A prime example
of the brittleness of this style of test.
2018-08-30 21:56:19 -05:00
Jimmy Berry
6069245350 Remove SUSE copyright, warranty, and license headers.
Distinct copyrights were left as I do not wish to track down commit
history to ensure it properly documents the copyright holders. Also left
non-GPLv2 licenses and left bs_copy untouched as a mirror from OBS.

Already have a mix of with and without headers and even OBS does not place
on majority of files. If SUSE lawyers have an issue it will come up in
legal review for Factory.
2018-08-23 19:18:06 -05:00
Jimmy Berry
dbfafe8e85 osclib/conf: utilize repo_checker-project-skip for OBS SLE projects. 2018-08-23 00:13:30 -05:00
Jimmy Berry
f0fadd6a05
Merge pull request #1650 from jberry-suse/conf-exclude-sub-projects
osclib/conf: exclude sub-projects from matching project patterns (and Leap:N:Update defaults)
2018-08-17 10:53:24 -05:00
Jimmy Berry
5b5d917074 osclib/conf: provide cached get() method to supersede ReviewBot cache.
Given the slow migration of everything to the shared project config in
tools that change project contexts multiple times a consistent way of
accessing the config without forcing remote calls is needed.
2018-08-17 10:16:43 -05:00
Jimmy Berry
5b44ea188d osclib/conf: provide Leap:N:Update default settings. 2018-08-17 00:08:09 -05:00
Jimmy Berry
dace1c3997 tests/obs: improve format of default Config attribute. 2018-08-16 21:54:20 -05:00
Jimmy Berry
760ddf39e6 osclib/conf: decouple from StagingAPI and always fetch remote config.
As the remote config is no longer optional for SLE and is utilized by
openSUSE to the point were it is dangerous not to load the remote config
it should be required. Currently only certain users call apply_remote()
while this will make it built-in during construction and thus makes the
usage consistent and no longer require StagingAPI.
2018-08-16 21:53:40 -05:00
Björn Geuken
9552b16330 Rename superseded_by_id to superseded_by
OBS is going to drop the superseded_by_id attribute soon as it is just
an alias for superseded_by.
2018-08-01 10:49:10 +02:00
Stephan Kulow
ae97da90e5 Remove more of :DVD subproject handling 2018-07-05 20:43:07 +02:00
76c20501ab tests: remove all subproject related part 2018-07-05 17:01:37 +08:00
Ludwig Nussel
9e59de4feb stagingapi: add support for Backports 2018-07-03 15:25:56 +02:00
30c32af1aa No longer have Ring2 and staging :DVD subproject 2018-06-29 18:29:47 +08:00
Ludwig Nussel
cc2fa88058 leaper: adjust for SLE 15SP1 and SLE12SP4 2018-06-28 14:24:35 +02:00