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>
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.
'rpm' is an optional dependency for kobo, which is required by the
integration tests.
Previously this dependency was implicitly satisfied by 'koji' pulling
in 'rpm-py-installer' which made sure 'rpm' is available. But
koji==1.20.0 made this dependency optional, so importing kobo.rpmlib
started failing.
Fix this by making 'rpm-py-installer' and explicit dependency for the
integration test environment.
Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
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>
Reduce number of jobs from 20 to 12 by merging them and using
templating to avoid code duplicity.
Jenkinsfile are directly put into jobs as a script - not pulled from
repository - avoiding issue with not clean workspace.
Secrets are taken from openshift using service account intead of
refering them in environment which caused that secret had to exist and
could be empty.
Job execution is straitforward - one jobs is repsonsible for each
process, only triggered jobs are c3iaas request and
pipeline-as-a-service job, everything else is managed by one job.
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>
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>