Commit graph

1536 commits

Author SHA1 Message Date
Tomáš Hozza
477e04eb55 Many: delete test manifests and gen-manifests command
The test manifests don't have any use in this repository, since the
osbuild-image-tests command has been removed. Likewise, generating
testing manifests is no longer needed in this repository, therefore
remove the gen-manifests command.

Manifests are being generated in the osbuild/images repository and the
necessary tooling to generate them lives there.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-08-07 10:22:55 +02:00
Tomáš Hozza
0ccc7b1f68 Test/README: remove mentions of image-tests
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-08-07 10:22:55 +02:00
Tomáš Hozza
eb2e4715b9 Test: remove image_tests.sh
The image_tests.sh test case is being run only as part of the RHEL
nightly pipeline. This test case evolved over the years. In principle
it can do the following:
 1. Read test cases from /test/data/manifests.
 2. Rebuild the manifest attached to the test case directly by running
    osbuild.
 3. Compare the image-info report if attached to the test case (NOT
    done for any test cases in /test/data/manifests).
 4. Boot-test the built image in the respective environment (NOT done
    for any test cases in /test/data/manifests).

Moreover, these manifests (or test cases) are not updated regularly
after being generated for the first time.

All in all, given the fact that the test case rebuilds outdated
manifests by directly calling osbuild and does not run any additional
tests, it adds no value compared to the osbuild/images CI.
osbuild/images CI always rebuilds the latest image definition version
manifests with osbuild, so at the time the library is updated in
osbuild-composer, this scenario has already been tested.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-08-07 10:22:55 +02:00
schutzbot
fad3b35d49 schutzfile: Update snapshots to 20250730 2025-07-31 10:39:58 +02:00
Tomáš Hozza
7ec210e433 test/repositories: use CDN repos for 9.5, 9.6 and 10.0
These releases are already GA. For 9.6 and 10.0, we test them in a
scheduled GA pipeline, which runs the CI tests on GA runners, which
don't have RH VPN access. Previously, some tests in the GA pipeline
would fail, because they would use rpmrepo snapshots of nightly composes
for these releases, which are behind RH VPN. Change the test repo
definitions to use CDN repositories instead, which should fix the GA
pipeline.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-07-23 11:36:50 +02:00
Tomáš Hozza
790a9d4e8b test/ubi-wsl.sh: add backward compatibility for composer < v146
Adjust the test case, so that it does not fail when run against older
osbuild-composer version, i.e. the one from RHEL-10 nightly CI pipelines.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-07-22 16:30:13 +02:00
Tom Koscielniak
d19d933fe8 tests/CI: Add runners for RHEL 9.6 GA and 10.0 GA
Add new GA runners and remove the old 9.5 GA runner. Remove repo overrides for new runners as well. Add a comment explaining why a regression-old-worker-new-composer test will fail when a new major version GA runner is added.
2025-07-21 13:04:03 +02:00
Tomáš Hozza
17380c7aca test/cross-distro.sh: move el9 test build to 9.6
RHEL-9.5 is EOL and we no longer ship repositories for it. Let's move
the el9 test build to RHEL-9.6.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-07-14 13:13:20 +02:00
Sanne Raymaekers
5d67542f3f test: adapt to images v0.155.0
- renamed wsl disk;
- install latest osbuild version in worker regression test (but keep the
  older worker).
2025-07-10 16:00:45 +02:00
Tomáš Hozza
c2f3e0486c Test/repositories/el8*: use rhui-4 instead of rhui-3
RHUI-3 has been EOL on RHEL-8 and it is no longer being updated and we
do not take new snapshots of it. Use RHUI-4 instead. More info in [1].

It turns out, that the previously used RHUI-3 snapshot was missing
amazon-libdnf-plugin package, wich is required by the RHUI client.
As a result, the "weldr dot-notation" test has been failing in the GA
pipeline on RHEL-8. We do not run the test case on RHEL-8 in PRs of
`main` pipeline, because we test only on nightly composes and there are
no new releases being developed for RHEL-8. Therefore this was
manifesting only in the GA pipeline runs.

This change should fix the failures in the GA pipeline.

[1] https://github.com/osbuild/rpmrepo/pull/119

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-07-03 12:59:52 +02:00
schutzbot
9f7b6210fe schutzfile: Update snapshots to 20250626 2025-06-27 21:19:21 +02:00
Tomáš Hozza
b4e2db8c35 Test/data: add F42 repositories
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-06-20 10:06:51 +02:00
Achilleas Koutsou
61e3fc7f2e Stop testing on Fedora 40 - Start testing on Fedora 42
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-06-20 10:06:51 +02:00
schutzbot
378ca76682 schutzfile: Update snapshots to 20250605 2025-06-18 20:40:14 +02:00
Florian Schüller
f26b992fe1 test/cases/oci.sh: Update shape to newer version
As of today it was recommended by oracle to use the
newer shape to be supported longer.
2025-06-06 14:34:04 +02:00
Florian Schüller
f0d39d986f test/cases/oci: improve CI output
Avoid error message where this is no error.
2025-06-06 14:34:04 +02:00
Florian Schüller
1d45104575 test/README.md: add a hint for the OCI env vars 2025-06-06 14:34:04 +02:00
Tom Koscielniak
488a53e106 tests: Fix failing cross distro test due to osbuild/images pseudo-version
The cross distro test started failing on RHEL 10.1, because the osbuild/images version was a Go pseudo-version that the sed command parsing the version did not recognize.
2025-06-03 17:06:52 +02:00
Tom Koscielniak
b3fab64dcc tests/CI: Fix missing slashes in RHEL 9.7/10.1 baseurl
In repository files for RHEL 9.7 and 10.1, there were missing slashes at the end of the baseurl which caused the satellite regression tests to fail. The refresh job only subs the snapshot dates and leaves the rest of the url unchanged.
2025-06-03 17:06:52 +02:00
Tom Koscielniak
93684fcef9 tests: Improve logging in api.sh test
Add compose request output print in case of failure.
2025-06-03 17:06:52 +02:00
Tom Koscielniak
557d5f440c tests/CI: Add runners for RHEL 9.7 and 10.1
Add runners for RHEL 9.7 and 10.1 and remove 9.6 and 10.0 runners.
2025-06-03 17:06:52 +02:00
schutzbot
8441138d2d schutzfile: Update snapshots to 20250515 2025-05-27 09:22:16 +02:00
Tomáš Hozza
b0d2d47180 Test/cross-distro: add version check for cross-building el8 on el9
The issue has been fixed in 9.6 0day ZStream in v132.1, so running the
test against anything older will make the test fail. This is currently
the case for RHEL-9-nightly pipeline.

Let's solve this annoyance.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-05-06 02:27:52 +03:00
Tomáš Hozza
c587e723a9 Test/cross-distro: take the images version used to compile composer
After the move of the repo configs to `osbuild/images`, we changed the
way to determine the all available distro repo configs by taking the
last release of 'images'. This turns out to be fragile, especially when
the test case is being run on a "rhel-x.y.0" branch or basically with
any old osbuild-composer binary. It could happen also in Nightly test
pipelines after the devel freeze.

We always compile osbuild-composer binary with debug information, so we
can determine the vendored 'images' version from the binary. We also
always ship repo configs from the same 'images' version in the RPMs.

Therefore modify the test case to check out the 'images' version that
osbuild-composer was compiled with and use repo configs from that
version.

In addition, don't reduce the depth when cloning the images repository,
because even 200 commits may be too little on some older RHEL ZStream
branches.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-04-30 14:36:48 +03:00
Tomáš Hozza
ad68e81f1f Test/cross-distro: fix processing of repo configs
Previously, the code would remove everything after the first dot in the
repo config filename. So 'rhel-10.0.json' -> 'rhel-10'. This means that
there was just a bunch of 'rhel-X' repo config names to compare. This is
probably a leftover from the days before we introduced dot-notation for
distro names.

Modify the test to effectivelly strip only the filename extension (the
part after the last dot, including the dot).

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-04-30 14:36:48 +03:00
Tomáš Hozza
7036e2bcb9 Many: expose rhsm.subscription_manager.rhsm.auto_enable_yum_plugins
Expose the ${SUBJ} customization in Cloud API. Weldr API inherited it
automatically with the update of `osbuild/blueprint` to v1.6.0.

Adjust relevant test cases and unit tests to use this new customization.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-04-29 18:22:40 +03:00
Irina Gulina
6f4c2899f8 remove workaround for CLOUDX-994 2025-04-25 13:42:27 +02:00
Sanne Raymaekers
bc5838b9d1 test/data/repositories: fix snapshot dates
Rpmrepo bot failed to update the references in all places.

See osbuild/rpmrepo#123 for more information.
2025-04-19 13:31:41 +02:00
schutzbot
62c75baa85 schutzfile: Update snapshots to 20250417 2025-04-17 21:52:16 +02:00
Achilleas Koutsou
eda67e2cc6 test: disable verification step for vsphere builds
The vsphere verification is failing consistently with the following
error message from govc:

  A component of the virtual machine is not accessible on the host.

Disabling it until we have time to look into it further.
2025-04-16 10:46:13 +02:00
Tomáš Hozza
f9a8ae8d0d test/cross-distro: test actual image build on RHEL and CentOS
Test actual image builds of older distros on RHEL and CentOS, to catch
issues such as https://issues.redhat.com/browse/RHEL-71397.

The test can be later extended to cover also Fedora, but this is out of
scope at this point, since the goal is to ensure that RHEL cross-distro
builds work, because these differ a lot.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-04-01 08:40:13 +02:00
Tomáš Hozza
d00a658752 test/cross-distro: building c8s is no longer supported by any distro
c8s is EOL.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-04-01 08:40:13 +02:00
Tomáš Hozza
b010a855f6 test/shared_lib.sh: make *print functions print to stderr
This will allow using them inside Bash function that return values,
without tainting the returned value.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-04-01 08:40:13 +02:00
Tomáš Hozza
856bdd3c74 test/cross-distro: remove unnecessary condition for composer < v97
This test case is no longer being run with an osbuild-composer version
lower than v97, so there's no need to special case it.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-04-01 08:40:13 +02:00
Tomáš Hozza
d90399c260 test/cross-distro: remove repo overrides and force restart composer
Completely remove the /etc/osbuild-composer/repositories directory used
for repo overrides, to ensure that only repos from the RPM are used.

Moreover, instead of trying to restart osbuild-composer, which is always
a tricky thing to do, let's just stop all services and call the Weldr
API. Since the service is socket-activated, this will start all the
necessary services.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-04-01 08:40:13 +02:00
Tomáš Hozza
930658d605 Test/api.sh/vsphere: configure cloud-init via VM's extraConfig
We used to provide the cloud-init user-data and meta-data to the VM as
key/value in the VM's extraConfig as guestinfo keys. This replaces bunch
of code that used to create an ISO, upload it to VSphere and attach it
to the VM.

We recently started to observe issues when uploading the ISO to our
testing VSphere instance in CI. This commit aims to circumvent this
issue by using a different and simpler way to provide the cloud-init
data to the VM.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-03-31 12:33:48 +02:00
Sanne Raymaekers
d08cedf73b test/cases/api: add modules 2025-03-20 14:07:52 +01:00
Ondřej Budai
cdb709f7f7 test: don't install wget in the openshift virt test
curl can do the job just fine, and it's already installed. Let's just
use it.
2025-03-20 09:50:17 +01:00
Ondřej Budai
5a76595fe9 test: retry uploads in the openshift virt test
The networking to the cluster seems slightly flakey, so I noticed
a few failures when playing with it. A little retry is able to fix it.

The function was taken from deploy.sh. I considered de-duping it,
but deploy.sh runs in a context where
/usr/libexec/tests/osbuild-composer/shared_lib.sh is not yet
established, so it's unfortunately no so simple. :(
2025-03-20 09:50:17 +01:00
Ondřej Budai
8f48d4f746 test: migrate the openshift virt test to a new cluster
The old one is going to be decommissioned. I only changed:
- extracted the storage class to a variable
- adjusted the openshift yaml file to what I was given in the UI
  - most importantly, we now use an instancetype to specify the
    resource requirements instead of doing it manually
  - the network is called default, instead of nic0 on this cluster
- we are downloading the oc and virtctl clients from the new cluster
  so the versions match
2025-03-20 09:50:17 +01:00
schutzbot
6d2d02027a schutzfile: Update snapshots to 20250225 2025-02-28 12:56:30 +01:00
Tomáš Hozza
8a4f093af6 Test/repositories: add RHEL 10.1 and 9.7 configs
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-02-28 09:35:23 +01:00
Tom Koscielniak
9b850de9f1 tests/CI: Re-enable the vmware tests on RHEL 10
Re-enable the vmware tests on RHEL 10 and use vcenter 8 instead of 6. This fixes the issues caused by outdated CPUs in old cluster by migrating to a new one with new hosts as well.
2025-02-25 16:29:20 +01:00
schutzbot
3d8bdb58a6 schutzfile: Update snapshots to 20250218 2025-02-20 17:46:40 +01:00
Michael Vogt
2fc64aeaca test: tweak cross-build.sh test to look at latest released images
This commit tweaks the `cross-build.sh` to checkout the last release
tag of the images library instead of using main. The issue with using
main is that there are many false positive errors when e.g. a new
fedora release is added to main.

Ideally it would use the tag of the vendored images library but
this particular test looks at the rpm content so the information
what version of images was used is not readily available (we could
fix this but the workaround of this commit is hopefully sufficient).
2025-02-19 19:19:42 +01:00
Michael Vogt
886ddc0bcc test: debug print INSTALLED_DISTROS in cross-distro.sh
Add more information when the cross-distro.sh test fails. Currently
it prints:
```
DEBUG: ===== ALL_DISTROS ====
rhel-8
...
rhel-8
DEBUG: ===== ALL_EXPECTED_DISTROS ====
fedora-40
...
fedora-42
DEBUG: ===== ALL_REMAINDERS ====
rhel-8
....
rhel-8
DEBUG: ===== END ====
Some distros are missing!
Missing distros:
```
But the most crucial information (i.e. what is installed) is
missing from this debug print (it can be found in a different
output but lets make it easy).
2025-02-19 19:19:42 +01:00
Florian Schüller
5cd2d8a2a9 test/README: image-builder repo was renamed to image-builder-crc 2025-02-14 10:12:29 +01:00
Michael Vogt
97e924b06c test: update cross-distro.sh to take repos from "images"
This commit updates the `cross-distro.sh` test to use the
`images`repository to get all the available image definitions.
2025-02-13 14:00:45 +01:00
Achilleas Koutsou
448b1e276d test/filesystem: print blueprint contents when creating file
Can be useful for troubleshooting and tracing test logs.
2025-02-05 11:32:52 +01:00
Achilleas Koutsou
077a56b9ac test/filesystem: minor cleanups
Remove incorrect comment (not an ostree image).
Add a greenprint for depsolving since it can take some time for that to
run and it makes more sense than pausing output on "Preparing
blueprint".
2025-02-05 11:32:52 +01:00