Commit graph

15 commits

Author SHA1 Message Date
Simon de Vlieger
b5e4775b24 test: simplify git clone command
In some (ununderstood) cases the combination of `--no-single-branch` and
`--depth=1` leads to the revision we want to check out not being
available.

Achilleas suggested to change the command to this instead.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-06-02 16:00:25 +02:00
Tomáš Hozza
2622782604 Test/manifest_tests: --osb-store -> --osbuild-store
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-01-31 10:18:14 +01:00
Tomáš Hozza
0b158c3fd3 Test/manifest_tests: use temporary dir if workdir is not specified
In case the workdir is not provided to the script explicitly as an
argument, the script will use a temporary directory under /var/tmp as
its workdir. In such case, the workdir will be deleted on exit. This
should mitigate potentially confusing behavior when executing the script
multiple times with different arguments, while never specifying the
workdir.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-01-31 10:18:14 +01:00
Tomáš Hozza
7cef5b480a Test/cases: delete manifest-db-based manifest_tests.sh
Delete the old manifest-db-based test case script, which is no longer
used anywhere.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-01-31 10:18:14 +01:00
Tomáš Hozza
a244003e6e Tests: add new manifest tests using osbuild/images cache
Add new implementation of the manifest tests, which goal is to ensure
that the osbuild behavior didn't change. This is ensured by comparing
image-info report produced for image artifact built using older
(known-to-be-good) osbuild version and the latest osbuild version
(potentially from a PR).

Previously, we used the osbuild/manifest-db repository, which contained
pre-generated manifests with their corresponding image-info report.
Unfortunately, this setup prooved to be cumbersome to maintain and keep
updated.

We are already building images for known manifests in the osbuild/images
repository. These are then uploaded to AWS S3 cache. The images are
built with a pinned osbuild version, which will be always older than the
one that we would be using for image build in osbuild PR.

So the intention of this new script is to take advantage of the
osbuild/images S3 cache. As part of the test case (for a specific distro
/ arch / image_type / config):
 - download the manifest from S3
 - download the image artifact, built from the manifest, from S3
 - generate image-info report for the downloaded image
 - rebuild the downloaded manifest using current version of osbuild
 - generate image-info report for the rebuilt image
 - compare the two image-info reports. If there is no difference, the
   test case PASS, otherwise it will FAIL.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-01-31 10:18:14 +01:00
Tomáš Hozza
139837f628 manifest_tests.py: use osbuild-image-info from osbuild package
Modify the test case to not use the image-info copy from manifest-db.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-12-18 12:50:32 +01:00
Tomáš Hozza
503cfb0936 CI: move the manifest_tests.sh from schutzbot/ to test/cases/
The test script should have been in the test/cases/ directory in the
first place.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-12-18 12:50:32 +01:00
Ondřej Budai
08d4bbf4dd test/ostree: parallelize the test
Building 7 images on one machine is quite slow. Instead, let's spawn build
them on separate ones to save some time.
2024-03-05 12:49:21 +02:00
Dusty Mabe
5ad3f968e1 manifests: add example metal4k disk image for Fedora CoreOS
The created disk image would be written to 4k native disks.
2023-11-29 10:37:08 +01:00
Dusty Mabe
0529ae79d1 tests: add metal output to fedora-coreos-container manifest
Also switch the qcow2 output to be a "qemu" platform image. This
change takes advantage of the recent org.osbuild.kernel-cmdline.bls-append
stage addition to modify kernel arguments in later pipelines.

To get a qemu image output:

- osbuild --output-directory out/ --export qemu test/data/manifests/fedora-coreos-container.json

To get a metal image output:

- osbuild --output-directory out/ --export metal test/data/manifests/fedora-coreos-container.json
2023-11-14 23:58:08 +01:00
Dusty Mabe
41652343a4 manifests: add fedora-coreos-container example/test
This example shows how to build a qcow2 very similar to the one
delivered by Fedora CoreOS. It uses an input container that has
the Fedora CoreOS OSTree already baked into it, which means that
the OSTree isn't built using this manifest, but taken as an input
from a remote registry.
2023-10-24 13:46:10 -04:00
Christian Kellner
acc54c5202 test/ostree-image: +fedora-ostree-native-container
Test building the new fedora-ostree-native-container manifest.
2022-12-15 11:13:19 +01:00
Simon de Vlieger
ea6085fae6 osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
Thomas Lavocat
bb30ffa062 Add the option of compressing using lz4
Using lz4 in squashfs reduces the time to complete the stage from 446s
to 4s on my laptop while making the produced iso going from 1.6G to
2.0G.
2022-01-11 13:20:11 +01:00
Christian Kellner
0aea72e44e ci: run ostree image tests via Schutbot
OSTree tests, especially the fedora-ostree-image one, will soon
need the tight integration with the host for LVM2/LUKS support.
This we cannot run them in github action containers. Move them
to Schutzbot.
Explicitly install the new sub-package until composer gains the
needed requirement.
2021-12-09 00:44:21 +00:00