51 Commits

Author SHA1 Message Date
Owen W. Taylor
ad4927fd01 Add a script to check the dist tarball, and use it to fix the dist tarball
* Add a script make-dist-tarball.py that runs 'setup.py sdist' and compares
  what gets distributed with git and with a set of patterns of extra files
  added during distribution, and with git files that we don't want to
  distribute.

* Extend MANIFEST.in or add __init__.py files to distribute:

   run-unittests.sh
   tox.in
   conf/client_secrets.json
   tests/test_builder
   tests/integration

* Don't include all of module_build_service - this is too prone to backup
  files and development trash files; instead add just the files we need
  that aren't *.py

* Move global-excludes to the end - they modify the existing list of files;
  and add *.db - for some reason, .mbs_local_build.db files were
  getting disted.
2023-04-04 16:07:10 +00:00
Brendan Reilly
e7016b25ae Replace dashes with underscore in stream name integration test 2021-10-29 11:40:35 -04:00
Mike McLean
22ffe54b63 more flake8 fixes: integration tests 2021-04-21 16:31:48 -04:00
jobrauer
f8530a49da Integration tests: add v3-packager coverage 2021-03-12 14:25:53 +01:00
jobrauer
46f27ce3ed Integration tests: enable parameters for clone_and_start_build fixture. 2021-03-12 14:12:53 +01:00
jobrauer
d3656b159b test_reuse_components_if_added: keep order in rpms, set -> list 2020-12-04 13:08:55 +01:00
jobrauer
bd4372315f Make koji and MBS client fixtures function scoped 2020-12-04 13:08:55 +01:00
jobrauer
d264ea3337 Test utils - bump up the build wait-timeout to 10 hours 2020-12-04 13:08:55 +01:00
jobrauer
f9b6002797 Test utils - add retry mechanism for MBS queries 2020-12-04 13:08:55 +01:00
jobrauer
de46aa9373 Test utils - in case of scratch build, don't wait for 'ready' state 2020-12-04 13:08:55 +01:00
jobrauer
adf56083fc test_reuse_components_if_added: assert test branch modulemd 2020-12-04 13:08:55 +01:00
jobrauer
3a9480de93 Extend MBS waiting times to prevent timeouts on stage. 2020-12-04 13:08:55 +01:00
jobrauer
6385d465d7 Add test_submit_module_build 2020-09-21 12:51:36 +02:00
jobrauer
e9df47d80c Add test_static_context 2020-09-10 13:27:21 +00:00
jobrauer
87c83ad0b8 Add test 'reuse components if added' 2020-08-07 15:47:39 +02:00
jobrauer
2c9984c803 Add test_scratch_final_mmd 2020-07-13 13:29:34 +00:00
Martin Filip
6ae9e1aeff Add test_highest_version_selection.py, example.test.env.yaml and expand utils.py 2020-05-13 08:52:46 -04:00
jobrauer
5bdae7a356 Add test.env example 2020-05-11 15:50:53 +02:00
jobrauer
110a17a57f Add 'test_rest_module_build' 2020-05-06 14:14:37 +02:00
jobrauer
53351670e3 Add test_buildonly 2020-05-05 15:37:11 +02:00
jobrauer
98ed3abc72 Add test_import_module 2020-04-24 13:43:33 +02:00
jobrauer
47c782b13e Remove type hint 2020-03-27 10:52:34 +01:00
jobrauer
b9dee9d454 Add test_reuse_tagged_module 2020-03-27 10:44:56 +01:00
jobrauer
5d8a54db23 Add test.env example 2020-03-09 08:57:38 +01:00
jobrauer
3fa8e5a610 Add comment 2020-03-02 07:29:52 +00:00
jobrauer
d6aefc8d55 Add except ErrorReturnCode to cancel build 2020-03-02 07:29:52 +00:00
jobrauer
a40f87e7d1 Address CRW
- add pytest.raises
 - add **kwargs in PackagingUtility.run(...)
2020-03-02 07:29:52 +00:00
jobrauer
938c243450 Satisfy flake 2020-03-02 07:29:52 +00:00
jobrauer
cdd0dcbb37 Add better assert, remove stdout/err redirect 2020-03-02 07:29:52 +00:00
jobrauer
e94dee5c50 Add test_buildrequire_module_not_in_tag 2020-03-02 07:29:52 +00:00
Martin Filip
22ebbad64b Add test_build_stream_collision.py and example config 2020-02-28 11:45:24 +00:00
Hunor Csomortáni
3ed1180669 Document integration test case and test environment design
Update the integration test README to explain the design of the test
case and test environment code. This should help future contributors.

Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
2020-01-30 15:36:05 +01:00
Martin Filip
ae60a344b1 Add test_normal_build_conflict 2020-01-29 16:29:51 +01:00
Mariana Ulaieva
fefeafa572 Implement the Stream Expansion scenario 2020-01-23 14:26:46 +01:00
Mariana Ulaieva
a5f6d8f136 Factor out packaging utility
Until now, it was assumed that the module-build command returned only
one build, so it was only one build_id. However, it is possible that
the module-build command will build more than one builds and therefore
a list of build_ids is needed. Also is needed to watch and cancel more
than one build.
For this reason run, watch, and cancel methods are methods of the
PackagingUtility class instead of Build class.  Run method returns list
of Build objects instead of build_id. And it's also possible to cancel
and to watch on all generated module builds.
2020-01-23 14:26:46 +01:00
Hunor Csomortáni
5f7442f8c1 Tests: Create a fixture for scenario configuration
Until now, to access the configuration of a scenario, the full path in
test_env had to be specified.

This might be cumbersome and error prone.

Create a scenario fixture, to make it easier to access the same
configuration.

Instead of

    test_env["testdata"]["my_scenario"]["my_config"]

one can use the following:

    scenario["my_config"]

Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
2020-01-16 10:29:14 +01:00
Mariana Ulaieva
c35fe26e73 No components integration test
Implement the Module With No Components integration test.
2020-01-10 14:38:13 +01:00
ejegrova
f61f7afbdd Add integration test for reuse components 2019-12-09 15:18:11 +01:00
Mariana Ulaieva
06974ef202 Reuse all components test
Implement the integration test for the Reuse All components Scenario.
2019-12-09 14:43:38 +01:00
Hunor Csomortáni
35c1097920 Tests: increase koji task timeout to 5 minutes
When running multiple test builds, the 1 minute timeout was often not
enough.

Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
2019-12-06 12:33:44 +01:00
Hunor Csomortáni
b2485a6150 Tests: fix koji.PathInfo
This should use "topurl". Remove the "weburl" config as it's not needed
anymore.

Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
2019-12-06 12:33:44 +01:00
Hunor Csomortáni
343f1b9818 Tests: separate starting and watching the builds
This makes the tests more explicit, but also prepares the ground to
enable canceling test builds during session teardown in the future.

Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
2019-12-06 12:33:44 +01:00
Hunor Csomortáni
72bb5a2943 Tests: bump the commit before builds
Whenever the tests start a "normal" (non-scratch) build, the commit
needs to be bumped.

Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
2019-12-06 12:33:44 +01:00
Hunor Csomortáni
cfb3549e79 Tests: clone modules with the packaging utility
This is how packagers do. Git URL configuration can also be removed.

Also: redirect command outputs, so that pytest can capture them.

Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
2019-12-06 12:33:44 +01:00
Mariana Ulaieva
4c8a92cb93 Integration test for the Cancel And Resume
Implement the integration test for the Cancel and Resume scenario.
2019-11-29 13:45:40 +01:00
ejegrova
1d25b81d4c Add integration test for normal build 2019-11-26 16:48:32 +01:00
Hunor Csomortáni
0f0e809467 Tests: allow running integration tests in parallel
This is done in order to speed up test execution.

Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
2019-11-20 16:47:12 +01:00
Hunor Csomortáni
b41b6b9cc1 Tests: allow reusing an existing module build
Module builds take a long time to run, which can be a pain to wait for
during integration test development.

Instead of requiring developers to locally tweak the test code to be
able to reuse module builds, allow specifying the build ID of the module
build to be reused in test.env.yaml .

Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
2019-11-20 14:27:33 +01:00
Mariana Ulaieva
6095ecc5fd Integration test for failed build
Implement the integration test for the failed build scenario.
2019-11-19 13:04:02 +01:00
Hunor Csomortáni
f5bf0d7252 Add integration test to check scratch module builds
Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
2019-11-07 14:30:53 +01:00