97 Commits

Author SHA1 Message Date
Dirk Müller
730630f06f
Use f-strings where possible 2024-05-07 21:52:32 +02:00
Stephan Kulow
c412dada22 CI: Split the tests in multiple runs
A test run of 40 minutes is just too much to wait for. So tag the long
running jobs to run in a special run
2022-03-07 18:48:43 +01:00
Stephan Kulow
a1f7a16e6f tests: Fix api_tests to mock attribute not mtime 2022-03-04 11:11:42 +01:00
Stephan Kulow
aaab4af930 Target F401 - Unused imports 2022-02-18 18:29:27 +01:00
Stephan Kulow
f86579642b Target E501 - Line too long
https://www.flake8rules.com/rules/E501.html - but 79 characters is a
joke
2022-02-18 18:17:27 +01:00
Stephan Kulow
f38bd3a7ed Target E128 - Continuation line under-indented for visual indent
https://www.flake8rules.com/rules/E128.html
2022-02-18 17:35:33 +01:00
Stephan Kulow
529d1dafae Target E302 - add two comment lines before class 2022-02-18 17:15:48 +01:00
Stephan Kulow
579145b52c Target F841 - Remove unused variables 2022-02-18 17:01:38 +01:00
Ancor Gonzalez Sosa
28c771927a Rename OBSLocal.StagingWorkflow to OBSLocal.FactoryWorkflow 2021-09-09 15:07:34 +02: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
8483632683 Some flake8 improvements
Was bored while waiting for a test run to finish. The rule is
that two empty lines distinguish larger blocks and shouldn't be
used between functions or within functions.
2019-11-27 10:40:15 +01:00
Stephan Kulow
13238d280f Reenable the move test 2019-11-26 15:56:00 +01:00
Stephan Kulow
d014002bc3 Disable move test for now
Waiting for https://github.com/openSUSE/open-build-service/issues/7360
2019-11-20 16:10:30 +01:00
Stephan Kulow
448795b3fc Fix test_add_sr not to add twice
Once a request is staged, the API refuses to stage again - and avoiding
this in our code is just wasting time, so stop testing it
2019-11-20 16:10:30 +01:00
Stephan Kulow
f3e69183a6 Fix rm_from_project test
The API automatically adds the staging manager back, so the request
won't become 'new'
2019-11-20 16:10:30 +01: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
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
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
8a7b65d505 Remove fake OBS in favor of using generated test data 2019-05-04 15:44:39 +02:00
Stephan Kulow
c11313b2dc Fix imports, python3 doesn't import from . 2019-04-30 14:29:16 +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
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
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
30c32af1aa No longer have Ring2 and staging :DVD subproject 2018-06-29 18:29:47 +08:00
35679d10b3 tests: fix testsuite for virtually accept 2017-10-02 17:15:55 +08:00
b7cea4615d Fix fixture for ring_pacakge get 2017-05-05 19:05:27 +08:00
Jimmy Berry
2a00de2bb5 Add lxml as test requirement and fix tests. 2017-01-24 22:34:27 -06:00
46c2c2304c Update fixtures 2016-06-13 16:55:05 +08:00
Ludwig Nussel
70c3d34731 Only call _invalidate_all if it exists
the memoize decorator adds the _invalidate_all function when called.
Due to the deferred initialization that may not happen in a test.
2016-05-10 10:29:37 +02:00
Alberto Planas
90412c30a4 Clean the cache after every test. 2015-08-03 13:21:45 +02:00
Stephan Kulow
77e9276340 no longer accept non-ring packages but show them in list 2015-07-16 12:42:25 +02:00
Alberto Planas
c9d1e06ca8 Refactor configuration parameters into configuration file. 2015-02-19 11:39:05 +01:00
5962765901 action #2858 Remove code from staging relate with the old osc staging check command 2014-07-31 14:16:54 +02:00
c5daf9a956 Remove fake oscs for testing. 2014-06-23 15:06:03 +02:00
550e98d6c2 Refactor of check_one_request into checkrepo module. 2014-06-12 18:26:09 +02:00
Ancor Gonzalez Sosa
507e50d633 Write only one comment per action
* For every 'select' or 'unselect' a single comment is written in
   every affected project
 * Previous automatic comments are deleted (as a first approach)
 * For more info, see https://progress.opensuse.org/issues/2564
2014-06-04 16:54:21 +02:00
77d1d18c48 Rewrite OBS mockup test, fixtures and tests. 2014-06-04 11:04:37 +02:00
Michal Hrusecky
31f3cdbc88 Test move from API 2014-03-05 11:12:53 +01:00
Michal Hrusecky
75d88686ec Improve select test suite 2014-03-04 16:35:30 +01:00
Michal Hrušecký
e8c3dcaf81 Merge pull request #88 from scarabeusiv/master
Implement non-ring project verification to not wait on obs/openQA
2014-03-04 15:46:23 +01:00
Tomáš Chvátal
6426d92b6a Fix whitespace. 2014-03-04 15:45:59 +01:00
Tomáš Chvátal
25ccbe0370 Fix ring-packages test. 2014-03-04 14:21:23 +01:00
Michal Hrusecky
673d08b8a3 Split select test to separate file 2014-03-04 12:45:44 +01:00
Michal Hrusecky
51aa975a39 Renaming tests to have nonconflicting name 2014-03-04 12:43:58 +01:00
Stephan Kulow
958a226ee2 test the basics for select 2014-03-04 10:55:55 +01:00
Michal Hrusecky
fe13ca7060 Adding back mock - lost in merge 2014-03-03 23:31:43 +01:00
Michal Hrusecky
dbb547555b Merge branch 'master' of github.com:openSUSE/osc-plugin-factory 2014-03-03 23:28:58 +01:00
Michal Hrusecky
7badb93081 Capturing current behaviour of check 2014-03-03 23:27:53 +01:00