Commit graph

19 commits

Author SHA1 Message Date
Jakub Rusz
07a18a5d49 tests/regression: Add config for v3 certificates
When generating x509 v3 certs we need to explicitely set "CA:TRUE"
otherwise they're not trusted to be used. Also start running the tests
on RHEL-9.5 and RHEL-10.0
2024-10-03 16:27:21 +02:00
Jakub Rusz
9a223500aa tests/regression: do not schedule skipped tests
Also fail in case it does get scheduled so we actually notice.
2024-08-12 08:39:05 +03:00
Alexander Todorov
fdb8cfb26a Temporarily disable testing with Satellite on el10
Related: COMPOSER-2264
2024-08-12 08:39:05 +03:00
Tomáš Hozza
d4c8f74ee4 Tests/regression-satellite: fix permission denied error in cleanup()
The cleanup() function cats the httpd log and error file, but did not
use sudo, which failed on permissions. Fix that.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-08-12 08:39:05 +03:00
Alexander Todorov
7668911038 Add version_id for regression test scripts for rhel-10
note: may fail in the same way 9.5 does (SSL certificates) and may need
to be disabled. See code few lines above this change.
2024-08-12 08:39:05 +03:00
Alexander Todorov
c80ca0a64d Temporary disable 2 regression tests on 9.5
Related: COMPOSER-2264
2024-06-07 10:31:54 +02:00
Alexander Todorov
ee1f70ec2e Add self-signed CA files to system trust store
in the hope that dnf in 9.5 will actually trust them and not fail
2024-06-07 10:31:54 +02:00
Tomáš Hozza
66571784d1 Use dot-notation for repo configs and in test cases.
Where applicable, modify all repo config filenames to use a dot
to separate the release major and minor version. Modify test cases
to not remove dot from the distro version any more.

Existing tests will be extended (or new tests added) to explicitly test
backward compatibility and ensure that using old distro names without a
dot still works.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-01-26 11:32:34 +01:00
Achilleas Koutsou
bf83bbea38 test: move greenprint and redprint functions to shared_lib.sh
Since we're sharing functions between test scripts, move greenprint(),
the most rewritten function in the history of the project, to
shared_lib.sh and source it everywhere.
2022-09-13 16:06:19 +01:00
Achilleas Koutsou
3b14828669 test: new weldr client compatibility for test scripts
- Handle the array responses from the new weldr-client (>= 35.6).
- Move the `get_build_info` function to shared_libs.sh to source and
  reuse in multiple places.
2022-09-13 16:06:19 +01:00
Juan Abia
1873c561cf test: disable non supported tests
some scripts skip the test if it's not supported for that
distro-version. Disable them in gitlab-ci.yml so we don't waste CI
resources.

To disable them, we are using the `rules` on each job with a regex
pattern. Using `=~` (pattern matches) as a  WHITELIST and `!~` (pattern
does not match) as a BLACKLIST.
2022-08-24 19:37:43 +02:00
Alexander Todorov
65ef1b2e78 Don't special case nightly repository names for Satellite regression tests
this is no longer needed b/c the nightly CI jobs are now using the same
json definitions as the regular CI jobs, just changing baseurl. See
previous commit.
2022-08-18 14:00:16 +03:00
Alexander Todorov
d3dde77a6f tests: Make Satellite regression tests to use the SUT 2022-08-10 16:33:34 +03:00
Alexander Todorov
860b122f2c tests: Remove useless JSON file overrides
See comment
https://github.com/osbuild/osbuild-composer/pull/2881/files#r940065803

for explanation why
2022-08-10 16:33:34 +03:00
Tomas Hozza
a4b0efb278 provision.sh: add none authentication method for on-premise scenario
`tools/provision.sh` is provisioning SUT always in the same way for
both, the Service scenario and the on-premise scenario. While this is
not causing any issues, it does not realistically represent how we
expect osbuild-composer and worker to be used in these scenarios.

The script currently supports the following authentication options:
- `none`
  - Intended for the on-premise scenario with Weldr API.
  - NO certificates are generated.
  - NO osbuild-composer configuration file is created.
  - NO osbuild-worker configuration file is created. This means that no
    cloud provider credentials are configured directly in the worker.
  - Only the local worker is started and used.
  - Only the Weldr API socker is started.
  - Appropriate repository definitions are copied to
    `/etc/osbuild-composer/repositories/`.
- `jwt`
  - Intended for the Service scenario with Cloud API.
  - Should be the only method supported in the Service scenario in the
    future.
  - Certificates are generated and copied to `/etc/osbuild-composer`.
  - osbuild-composer configuration file is created and configured for
    JWT authentication.
  - osbuild-worker configuration file is created, configured for JWT
    authentication and with appropriate cloud provider credentials.
  - Local worker unit is masked. Only the remote worker is used (the
    socket is started and one remote-worker instance is created).
  - Only the Cloud API socket is started (Weldr API socket is stopped).
  - NO repository definitions are copied to
    `/etc/osbuild-composer/repositories/`.
- `tls`
  - Intended for the Service scenario with Cloud API.
  - Should eventually go away.
  - Certificates are generated and copied to `/etc/osbuild-composer`.
  - osbuild-composer configuration file is created and configured for
    TLS client cert authentication.
  - osbuild-worker configuration file is created, configured for TLS
    authentication and with appropriate cloud provider credentials.
  - Services and sockets are started as they used to be originally:
    - Both local and remote worker sockets are started.
    - Both Weldr and Cloud API sockets are started.
    - Only the local worker unit will be started automatically.
  - NO repository definitions are copied to
    `/etc/osbuild-composer/repositories/`.
2022-08-04 11:55:43 +02:00
Achilleas Koutsou
cd49c932a2 test: add prominent message in test script cleanup functions
When a test script fails in CI, it's often difficult to pinpoint the
exact line in the log where the script failed and the cleanup() function
(trapped on EXIT) begins.

Adding a prominent line (with greenprint where available) at the start
of the cleanup function will make reading logs of failed jobs a lot
easier.
2022-05-25 22:10:27 +02:00
Jakub Rusz
e1bb8ab47c tests/ci: split regression tests
Regression test suite has grown considerably and is taking too long to
run with a single wrapper. Splitting them into individual standalone
tests instead and making them run in parallel.
2022-04-04 12:18:53 +02:00
Juan Abia
4c5de045ff test: add test purpose
Most test scripts don't have any documentation regarding it's purpose,
although it can be guessed by the code. There's value in adding this
small comment.

[skip-ci]
2022-03-09 22:46:25 +01:00
Juan Abia
211dd88ccb test/cases: divide regression test
split regression-composer-works-behind-satellite in two different tests.
As they test independent funcionalities.
2022-01-06 09:45:38 +01:00