Commit graph

17 commits

Author SHA1 Message Date
Tomáš Hozza
6e3a41ae07 Don't run TestMultilibBlueprintDepsolveV0 on el10 / c10s
TestMultilibBlueprintDepsolveV0 unit test relies on 'gsl' package and
the availability of its 32 bit and 64 bit versions in the distribution
repositories. However, the package is no longer available in c10s /
el10. Moreover, there are no 32 bit RPMs in the repositories.
Conditionally compile the test only if 'rhel10' build tag is not
specified. Modify the SPEC file to define 'rhelX' build tag when
compiling tests on RHEL, where X is the major version.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-06-04 13:03:37 +02:00
Florian Schüller
d900a5315e blueprints_test: Simplify check of the error message RHEL-16006 2024-02-22 15:22:52 +01:00
Florian Schüller
fe338cc475 blueprints_test: change to exact error message validation RHEL-16006 2024-02-22 15:22:52 +01:00
Florian Schüller
7bfd3ea464 blueprints_test: change to more readable table driven tests 2024-02-22 15:22:52 +01:00
Florian Schüller
fb8634a991 blueprint: improve error message on missing name
the error should not infer that a version is mandatory.
Also the error message is now explicitly checked
2024-02-22 15:22:52 +01:00
Florian Schüller
99e84abc66 api: add error message for package without name RHEL-16006 2024-02-22 15:22:52 +01:00
Alexander Todorov
eb5dd8ae1b Conditionally skip test based on osbuild-compose.rpm version from distro 2023-06-15 08:54:57 +02:00
Brian C. Lane
c7bc25cead tests: Add a test for freezing a blueprint with globs
This is currently failing (fixed in the next commit). It tests to make
sure that a blueprint with package name globs can be frozen. The
resulting blueprint should replace the glob entries with the expanded
list of packages.
2023-05-19 08:14:33 -07:00
Brian C. Lane
73ab18a501 tests: Add a test for blueprint package name globs
This tests to make sure that package name globs are working during
integration test runs. dnf supports this, and users have been using it,
so testing to make sure it keeps working is important.
2023-05-19 08:14:33 -07:00
Brian C. Lane
088ca6ec72 client: Add GetBlueprintChangeV1
Add a function to recall a specific blueprint change. Also includes
tests.
2022-11-24 11:19:14 +01:00
Brian C. Lane
b476078570 Move isStringInSlice to common.IsStringInSlice 2021-07-12 08:58:42 +02:00
Brian C. Lane
7ca9579487 client: Add an integration test for a bad blueprint depsolve
This test makes sure that a bad /blueprints/depsolve/... will return a
list of blueprints and a list of errors, not just a single error 400
response.
2020-07-28 08:18:56 +02:00
Ondřej Budai
fa0d800850 test: add a test-case to prevent bad multilib depsolves
When gsl with version * was specified in the blueprint,
composer depsolved both x86_64 and i686 version of gsl.
This test case should prevent this from happening.
gsl is used because it has x86_64 and i686 versions on both RHEL and Fedora.
Also, gsl-devel package exists, which is not dependant on gsl and shouldn't
be depsolved.
2020-06-10 17:40:30 +02:00
Brian C. Lane
c000a409a3 tests: Add missing descriptions to test blueprints
These were causing the wrong error when running against lorax-composer.
2020-05-28 08:28:11 +02:00
Brian C. Lane
369312989f blueprints: Fix handling of invalid blueprint names in the API code
Empty names are not allowed, and blueprint names should only contain
characters matching: ^[a-zA-Z0-9._-]+$

This also adds tests for the various places where the blueprint name
could potentially be wrong.
2020-05-13 20:00:52 +02:00
Brian C. Lane
e3934108f7 client: Handle the differences between unit tests and integration tests
The mock server used by unit tests is slightly different than the
running server, mostly related to package names that are hard-coded.

This adds a bool to testState that can be used in the tests to alter the
expected behavior. It should be used as little as possible.
2020-03-27 19:07:33 +01:00
Brian C. Lane
856eb59edf client: Move the weldrcheck integration tests to client
With this change the integration tests can now also be run as unit tests
against the mocked server. The way it works is this:

internal/client/unit_test.go sets up the mock server and is built
when the `integration` build tag is *not* included.

internal/client/integration_test.go sets up the connection to an
existing server and is built when the `integration` build tag *is*
included.

The test code is built and run for both cases.

Currently they all pass for the integration test run. The unit test
cases need some work because the mocked server isn't a real server with
real depsolving and package lists. A future commit will fix this.
2020-03-27 19:07:33 +01:00
Renamed from internal/weldrcheck/blueprints_test.go (Browse further)