Commit graph

1384 commits

Author SHA1 Message Date
Alexander Todorov
3732028d59 Update Arm64 EC2 instance to a newer one
This one is 1 vCPU + 4GiB RAM, the older one is 2 vCPU, same RAM
2024-04-18 10:52:24 +02:00
Sanne Raymaekers
bde74c218b test/regression-old-worker: pick correct osbuild commit
The osbuild version should correspond to the version in the Schutzfile
for the old worker.

Furthermore the commits should be pulled from the rhel-9-cdn
repositories.
2024-04-17 10:27:08 +02:00
schutzbot
6f69cacdc5 schutzfile: Update snapshots to 20240415 2024-04-17 10:27:08 +02:00
Achilleas Koutsou
9aa80c25bc test: drop oscap test script and gitlab job
The test is being migrated to osbuild/images.
See https://github.com/osbuild/images/pull/502

Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2024-03-27 17:20:37 +01:00
Achilleas Koutsou
3e0f8a7ac3 test: modify the kickstart file in nightly pipelines
Nightly pipelines test against older osbuild-composer versions so we
need to still modify the kickstart file until the feature reaches the
nightly composes.
2024-03-20 11:45:08 +01:00
Achilleas Koutsou
eccdcfcab0 test: use new installer customizations
Use the new installer customizations to build and boot an unattended
installation and add the users to the sudoers with NOPASSWD enabled.

This is added both to he base installer test (installers.sh) and the
ostree test (ostree-ng.sh).  For the ostree test, we keep the mkksiso
step to retain the remote configuration change.  The modksiso() function
is changed to explicitly read the osbuild.ks file since we don't want to
modify the osbuild-base.ks file and we want to ensure that the kernel
command line argument points to the osbuild.ks file.
2024-03-20 11:45:08 +01:00
Sanne Raymaekers
4e2d990af8 test/worker-executor: internet access during executor setup 2024-03-19 17:07:30 +01:00
Simon Steinbeiss
bdc973d085 test/api.sh: Drop distro aliases and dot-notation
This reverts commit 2fe5e01d4d with the
exception of the changes in tools/provision.sh.
This functionality is covered by unit tests in osbuild/images:
aaa53adc3c/pkg/distrofactory/distrofactory_test.go (L9)
2024-03-06 13:28:30 +01:00
Achilleas Koutsou
e8a3aac989 test: update minimal-raw test
Update minimal-raw test with new artifact filename.

Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2024-03-06 10:17:28 +01:00
Alexander Todorov
4db594dac7 Skip image_installer tests b/c already tested in installers.sh 2024-03-06 09:09:39 +01:00
Alexander Todorov
d0237daf75 Create a custom group via blueprint in installers.sh test script 2024-03-06 09:09:39 +01:00
Alexander Todorov
d7388fdc66 Remove already tested manifests from test-case-generators
and remove redundant skips from image_tests.sh
2024-03-06 09:09:39 +01:00
Alexander Todorov
eb5db0bd2c Skip all edge image types, already covered in Edge CI 2024-03-06 09:09:39 +01:00
Alexander Todorov
a74756e4fb Skip gce image type, already covered in gcp.sh 2024-03-06 09:09:39 +01:00
Alexander Todorov
c25db57d7d Skip image types covered in azure.sh
namely vhd-boot
2024-03-06 09:09:39 +01:00
Alexander Todorov
c67add4a6e Skip image types already covered in vmware.sh
namely ova-boot|vmdk-boot
2024-03-06 09:09:39 +01:00
Alexander Todorov
20a36964a9 Skip Image Tests for image types already covered in osbuild/images
namely ami-boot|edge_ami|ec2-boot|ec2_ha|ec2_sap

Related: COMPOSER-2127
2024-03-06 09:09:39 +01:00
Simon Steinbeiss
362caacd1f tests: Drop bigiso test (HMS-3710)
This test is being migrated to osbuild/images.
2024-03-06 01:14:57 +01:00
Tom Koscielniak
b4dcfc4480 Remove libvirt workaround 2024-03-04 15:39:08 +01:00
Alexander Todorov
8f28da5214 Check for unbound variables in cleanup() 2024-03-04 12:49:56 +01:00
Alexander Todorov
e4b514ca3a Don't trap the EXIT signal twice
killing the worker journal via EXIT signal prevents the cleanup()
function from executing!

NOTE: this is a problem in other scripts as well and needs to be
refactored there too!
2024-03-04 12:49:56 +01:00
Alexander Todorov
97c0c21513 Test images in OpenShift Virtualization 2024-03-04 12:49:56 +01:00
Sanne Raymaekers
6602acda6b test/cases/worker-executor: test the aws.ec2 osbuild-executor
Sets up the executor over ssh and waits until completed.
2024-03-01 19:20:51 +01:00
Mario Cattamo
e6a7cb2544 ci: skip ostree-remount check in CS9 due to bug RHEL-25249 2024-02-27 17:11:03 +01:00
Tomáš Hozza
218a784778 Test/base_tests.sh: workaround missing osbuild-depsolve-dnf in nightly
The RHEL nightly composes still contain old osbuild-composer version,
which does not have an explicit dependency on osbuild-depsolve-dnf
package.

As a result, running the latest upstream base_tests.sh on RHEL nightly
composes fails due to osbuild-depsolve-dnf not being installed.

Workaround this in the test case by explicitly installing the
osbuild-depsolve-dnf package in case the osbuild-composer version is
lower than the one which has an explicit dependency on
osbuild-depsolve-dnf.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-02-20 15:55:47 +01:00
Diaa Sami
82add84c31 Test/old-worker-new-composer: use latest composer for verification
To avoid incompatibility between older image-info and latest osbuild
2024-02-20 15:55:47 +01:00
Achilleas Koutsou
bbbb3278f8 test: update fedora-39 test repositories
Required for bootc for iot-bootable-container.
2024-02-02 10:34:41 +01:00
Achilleas Koutsou
76a699653a test: add iot-bootable-container to api tests
The image type supports uploading to both s3 and container registries.
Right now we only care about getting it in Koji, so let's just add it to
the s3 upload section.

The container registry test also embeds containers in the image, which
the iot-bootable-container doesn't support (yet).
2024-02-02 10:34:41 +01:00
Tom Koscielniak
d97f54cc5c Add RHEL 9.3 and 8.9 GA to pipeline 2024-02-01 16:07:27 +01:00
Tomáš Hozza
1fa72f262e test/api.sh/vsphere: specify the resource pool for image import
Specify the resource pool when importing the VMDK to the VCenter.
This should prevent the following error:

govc: default resource pool resolves to multiple instances, please specify

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-01-26 11:32:34 +01:00
Tomáš Hozza
e664d49541 Test/old-worker-new-composer: don't wait for composer indefinitely
The test would loop for the job timeout limit waiting for composer
container, in case the composer API does not come up for whatever
reason. Modify the test case to wait only for 12x 10s before failing.
In case the composer API does not come up, print the logs from the
composer container and exit with non-zero code.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-01-26 11:32:34 +01:00
Tomáš Hozza
a33da152da Test/weldr: add test for dot-notation and distro aliases
Add test case for verifying that distros and repo configurations work
with and without the dot-notation in the on-prem scenario. Run the test
case on the latest RHEL 8 and 9 versions in development and verify the
default distro aliases behavior on them.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-01-26 11:32:34 +01:00
Tomáš Hozza
2fe5e01d4d Test/api.sh: test distro aliases and names without dot-notation
Extend the `api.sh` to allow testing compose requests with distro name
which does not use dot-notation (specifically when the dot is removed
from the distro name as it used to be in the past). In addition to that,
allow also testing the distro alias using distro name without the minor
version in compose requests.

Enable these two new test variants in the CI.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-01-26 11:32:34 +01:00
Tomáš Hozza
fb6acbbe83 test/data/repositories: update GA releases and add SAP repos
Update RHEL 8.9 and 9.3 repo definitions to use the CDN repos, since
these are already GA.

Add SAP repositories to all RHEL repo configs, to be able to build the
SAP image for testing purposes.

Fix minor issues found in repos (e.g. 8.8 RT repo pointing to 8.7,
etc.).

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-01-26 11:32:34 +01:00
Tomáš Hozza
9252e2525c Test/azure.sh: don't use dot-notation for image name
Using the DISTRO_CODE with dot to separate major and minor version is
breaking cloud-image-val testing. Specifically, the tool is using
regular expression to search for an uploaded image, but the expression
is not expecting any dot in the version.

This will be fixed in [1], but merging it will take some time due to CIV
CI being currently broken. Due to this, workaround the problem for now
by making sure that the TEST_ID, which is used to construct the
IMAGE_NAME, does not contain any dot in the DISTRO_CODE.

[1] https://github.com/osbuild/cloud-image-val/pull/290

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-01-26 11:32:34 +01:00
Tomáš Hozza
499cda4a57 Test/manifests: rename files to use dot-notation
Otherwise, the image tests will fail on globing for testing manifests.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-01-26 11:32:34 +01: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
Tomáš Hozza
c82c0ae6b5 Test/api.sh: pass TEST_MODULE_HOTFIXES as an env variable
While I was the one to push for TEST_MODULE_HOTFIXES to be passed as an
argument to `api.sh`, when it was implemented, this is turning our to be
impractical. I would like to extend `api.sh` to test distro names with
and without the dot to separate major and minor version and also to test
the ability to specify distro name explicitly (e.g. a distro alias).
Passing all of these new options and their combinations would make the
CLI go wild.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-01-26 11:32:34 +01:00
Tomáš Hozza
625b1578fa Port osbuild/images v0.33.0 with dot-notation to composer
Update the osbuild/images to the version which introduces "dot notation"
for distro release versions.

 - Replace all uses of distroregistry by distrofactory.
 - Delete local version of reporegistry and use the one from the
   osbuild/images.
 - Weldr: unify `createWeldrAPI()` and `createWeldrAPI2()` into a single
   `createTestWeldrAPI()` function`.
 - store/fixture: rework fixtures to allow overriding the host distro
   name and host architecture name. A cleanup function to restore the
   host distro and arch names is always part of the fixture struct.
 - Delete `distro_mock` package, since it is no longer used.
 - Bump the required version of osbuild to 98, because the OSCAP
   customization is using the 'compress_results' stage option, which is
   not available in older versions of osbuild.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-01-26 11:32:34 +01:00
Alexander Todorov
35c4d3efba Revert "test/cases: Add workaround for oscap firewalld rules"
b/c https://github.com/ComplianceAsCode/content/issues/11275 has been
fixed. This reverts commit c77b73a888.
2024-01-22 15:22:34 +04:00
Alexander Todorov
6735e74897 Invert wrong boolean condition in filesystem test
the conditionals have been introduced in
8960a51d2f
which states (emphasys mine):

> The new partition rules are **in** osbuild-composer v94 and higher.

but the condition was "not v94 or higher" and as a result it fails on
8.10 nightly with osbuild-composer v92 with:

failed to initialize osbuild manifest: The following custom mountpoints are not supported [\"/boot/firmware\" \"/foobar\"]

see https://gitlab.com/redhat/services/products/image-builder/ci/osbuild-composer/-/jobs/5905865402
2024-01-11 20:57:46 +04:00
Michael Vogt
5f678b1d7b test: add debug output to filesystem.sh if mounting fails 2024-01-10 15:47:42 +01:00
Alexander Todorov
ba2f5a7ecb Fix a boolean condition in filesystem.sh 2024-01-10 15:47:42 +01:00
schutzbot
f25bbda32d schutzfile: Update snapshots to 20240101 2024-01-04 11:29:43 +01:00
Tomáš Hozza
cfc63297eb Test: delete "diff manifests" test case
This is not adding any value any more, since all image definitions are
defined in the osbuild/images repository and just vendored in this one.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-12-22 12:21:59 +01:00
Alexander Todorov
42a90914ab Surround composer-cli call with set +e/set -e as a workaround
because apparently calling nvrGreaterOrEqual inside a for loop doesn't
behave as expected and this fails on the second iteration.
2023-12-22 11:07:52 +01:00
Alexander Todorov
b47e741895 Add even more debug output
loop iterates overt centos-8 and then goes onto centos-9 and everything
fails silently
2023-12-22 11:07:52 +01:00
Alexander Todorov
8b91cf6060 Add debugging information for cross-distro.sh 2023-12-22 11:07:52 +01:00
Alexander Todorov
d6aff2f103 Adjust expected response based on osbuild-composer version 2023-12-22 11:07:52 +01:00
Ondrej Ezr
d5483ccfb0 test: Add nginx to the image request 2023-12-20 09:02:06 +01:00