54 Commits

Author SHA1 Message Date
76c20501ab tests: remove all subproject related part 2018-07-05 17:01:37 +08:00
Stephan Kulow
0180de281a Fix test cases 2018-06-15 13:16:46 +02:00
f10defda8c
Disable ppc64le for now in Tumbleweed stagings 2017-09-15 22:50:48 +02:00
Stephan Kulow
ad0633d60a Do not use direct flag for images
Products are too touchy - I had now 3 cases where the product would not
rebuild if a meta package changed
2017-09-01 13:53:44 +02:00
Jimmy Berry
beb80534f0 unslect: --cleanup handle superseded request that is never replaced. 2017-05-15 17:52:28 -05:00
28a0ee0c8e Merge pull request #881 from nilxam/map_rings_fix
Refactor map_ring_package_to_subject to support corner case
2017-05-05 06:55:32 -05:00
b7cea4615d Fix fixture for ring_pacakge get 2017-05-05 19:05:27 +08:00
Jimmy Berry
931c8a2908 tests/unselect_tests: add test for cleanup fitler. 2017-05-04 15:08:13 -05:00
Jimmy Berry
bb2678dc00 config: implement tests suite. 2017-05-01 17:40:34 -05:00
Jimmy Berry
77b2185500 obslock: implement test suite. 2017-05-01 17:10:36 -05:00
Jimmy Berry
7621d4f7f6 tests: add missing creator attribute to requests to satisfy osc. 2017-04-13 15:08:15 -05:00
Jimmy Berry
a0441417e1 tests: add missing project/staging_project staging U to summary. 2017-03-16 23:16:21 -05:00
Jimmy Berry
cff5befed3 Provide cache for expensive and cache-able staging requests.
The two slowest staging API calls are for information that rarely changes.
By caching the result the commands typically execute over twice as fast.
Going further can see improvements of an order of magnitude or more by
caching almost all the GET requests.

In contrast to osclib/memoize.py this cache operates at the HTTP request
level. This has several advantages:

- Caches the expensive part (ie the HTTP request). There are a number of
  functions in osc.core and elsewhere that make the same API request, but
  process the result differently which would require multiple API calls
  using memoize.
- Handles cases were a loader function uses class attributes as input and
  output and thus no relevant method parameters or return. An important
  example is StagingAPI._generate_ring_packages().
- Storage is project aware which allows caches to be deleted when a project
  is known to have changed.
- Due to project awareness, can utilize OBS /statistics/latest_updated API
  call to determine which projects need to be expired.

The cache file structure is as follows:

- hostname(apiurl)
  - project
    - sha1(url)
  - sha1(url)

See Cache.PATTERNS for changing the time to live (ttl) or add patterns to
be cached.
2017-01-11 10:23:54 -06:00
46c2c2304c Update fixtures 2016-06-13 16:55:05 +08:00
69e1771a11 API: add a is_user_member_of() function 2015-08-06 15:54:56 +02:00
Dinar Valeev
c3bc54cf1f Fix expected architectures
With extention osc_freeze command to the new architecture, we've forgot
to add tests. Lets fix it

Signed-off-by: Dinar Valeev <dvaleev@suse.com>
2015-03-19 10:47:14 +01:00
Alberto Planas
37c7e2a6c6 Add a test for accept command when there are multiple SPECs 2015-03-02 11:15:24 +01:00
Alberto Planas
1e2ea101e2 Replace subprojects array with subproject. 2014-09-29 11:51:43 +02:00
Stephan Kulow
4185bfc552 adapt test fixtures 2014-09-01 11:14:44 +02:00
Stephan Kulow
e2ff3e8afa changed the paths again after discussion 2014-08-25 12:44:05 +02:00
af41f78daa action #3078 - adapt check_command to the new dashboard route 2014-08-22 14:30:41 +02:00
5962765901 action #2858 Remove code from staging relate with the old osc staging check command 2014-07-31 14:16:54 +02:00
3d5201b5c6 Fix fixtures and tests. 2014-07-17 14:58:02 +02:00
2cbddb6f9d Add failing modules information for openQA. 2014-07-09 17:50:06 +02:00
5750f4dfb0 action #2628 adapt osc staging check to read the information from obs_factory. 2014-07-08 15:33:39 +02:00
b73b0bb45d Fix tests 2014-07-04 15:20:28 +02:00
ccfb48511e Add initial test for check_specs. 2014-06-25 14:17:52 +02:00
46c5c5c001 Initial tests for checkrepo. 2014-06-25 12:00:07 +02:00
Stephan Kulow
4b432b9bb1 fix the test suite for the subpkg tests
actually the biggest impact has my refusal to select into outdated prjs
2014-06-17 14:39:51 +02:00
Ancor Gonzalez Sosa
e439717f2e Fixtures for source/home:Adrian turned into symlinks 2014-06-16 17:38:43 +02:00
Ancor Gonzalez Sosa
c7774d8b8b AcceptCommand only adds one comment
Added tests for AcceptCommand with a new Staging:C fixture.
2014-06-16 17:15:24 +02:00
77d1d18c48 Rewrite OBS mockup test, fixtures and tests. 2014-06-04 11:04:37 +02:00
Stephan Kulow
742d80d059 fix test by giving real results not fake 2014-03-06 10:44:52 +01:00
Michal Hrusecky
75d88686ec Improve select test suite 2014-03-04 16:35:30 +01:00
Tomáš Chvátal
69644939f9 Add wine to the staged packages so we won't ignore testresults in test. 2014-03-04 14:16:24 +01:00
Stephan Kulow
958a226ee2 test the basics for select 2014-03-04 10:55:55 +01:00
Stephan Kulow
ad71b0843b implement api call to get days since last freeze 2014-03-03 15:32:33 +01:00
Tomáš Chvátal
a1cc405c3e Really test ring comparsion. 2014-02-27 13:39:57 +01:00
Michal Hrusecky
2ead43c950 Migrated test_get_package_information 2014-02-25 15:44:40 +01:00
Michal Hrusecky
f606046e8e Get rid of not needed fixture 2014-02-25 13:16:48 +01:00
Michal Hrusecky
f3332b1c48 New test for project pseudometadata
With new testing class, we can test that it works even better.
2014-02-25 09:28:46 +01:00
Michal Hrusecky
42182ab48a Merge branch 'master' of github.com:openSUSE/osc-plugin-factory
Conflicts:
	tests/api_tests.py

Resolved manually
2014-02-24 17:20:48 +01:00
Michal Hrusecky
dbb0632977 Split initial state machine to separate class
Move OBS simulation to separate class, should be eventually moved to separate
file as well. And converted test_dispatch_open_requests to use new and shiny
testing infrastructure.
2014-02-24 15:52:30 +01:00
Stephan Kulow
576e6ee716 check the request for open reviews before accepting them to avoid errors
issue 1593
2014-02-24 13:30:34 +01:00
Michal Hrusecky
00108750be Better testing, so far only for request reviews
To make testing more reliable and nice and generally better, we need to address
few issues. First of all, currently it is hard to figure out what was test
trying to access if accessing it fails. Second issue was that we mixed both
tests and OBS simulation logic. In perfect world, we should write some state
machine simulating OBS in some limited way and checking that scripts behaviour
corresponds to it.

This commit attempts to solve it at one example - review handling test.
2014-02-19 10:49:10 +01:00
Michal Hrusecky
e44f86a939 Tests for review manipulations 2014-02-17 15:12:18 +01:00
Stephan Kulow
b2fff384b2 move the 'freeze' command in a file on its own and implement issue 1515 2014-02-15 16:42:07 +01:00
Michal Hrusecky
7acc216073 Tests for checking repository status 2014-02-14 19:17:31 +01:00
Michal Hrusecky
a74d37ddd9 Not crashing on valid but incorrect YAML
Making sure that if we succeed in reading YAML, the result actually contains
the structure we want/need.
2014-02-13 10:44:58 +01:00
Tomáš Chvátal
10e73642f1 Add posibility to move packages between rings with one test. Accidentaly also fix failing test. 2014-02-12 14:27:49 +01:00