Commit graph

622 commits

Author SHA1 Message Date
Alexander Todorov
83cec26a5a Remove cloud-init/network-config file from tests
- not used in oscap.sh test at all
- causes VM in libvirt.sh test to acquire a different IP address instead
  of the hard-coded one inside the test, which causes SSH to fail

- not used anywhere else
2023-06-15 08:54:57 +02:00
Alexander Todorov
1f28e50d21 Adjust tests for new distros
References:
- https://redhat-internal.slack.com/archives/C0235DZB0DT/p1685528139831589
- 1fbd9d975f
2023-06-15 08:54:57 +02:00
Xiaofeng Wang
49bad21c45 CI: Move RHEL for Edge CI into osbuild/rhel-edge-ci repo
1. Run RHEL for Edge CI on osbuild/rhel-edge-ci repo
2. Use released RHEL 8.8 and 9.2 boot ISO
3. Extend VM memory to 3072 on ostree.sh to fix error
"Overriding memory to 3072 MiB needed for centos-stream9 network install."
4. Install and start firewalld, configure VM network as trusted zone
2023-06-12 10:00:23 +02:00
Diaa Sami
8398f27742 internal/cloudapi: additional prometheus listener
Listening on another port, while keeping the existing endpoint until
transition is complete
2023-06-07 17:05:32 +02:00
Ondřej Budai
a2342ecc5d test/aws.sh: remove enabling cloud-init and bash from the blueprint
cloud-init and bash should be everywhere. Thus, there's no point in specifying
them as a customization. Actually, it might mask error if we ever stop
installing bash/enabling cloud-init.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2023-06-06 13:04:10 +02:00
Simon de Vlieger
5e6c0642cd fedora: f36 went EOL
Removes all references to Fedora 36 since it went EOL.

See: https://docs.fedoraproject.org/en-US/releases/eol/
2023-06-05 18:14:34 +02:00
Jakub Rusz
686b01d0ba tests/vmware: fix cleanup trap and failure check
The cleanup trap was removed and therefore it never ran. Also changing
the check if the test is successful as before it was passing despite
failures being present.
2023-05-30 16:45:30 +02:00
Jakub Rusz
86d11d9b67 tests/vsphere: report only ipv4 address 2023-05-30 16:45:30 +02:00
Jakub Rusz
a5547a2fa0 vmware: fix typo in cleanup call 2023-05-30 16:45:30 +02:00
Sanne Raymaekers
6335fb38cc test/cases/vmware.sh: add integration test for ova types 2023-05-25 10:14:32 +02:00
Tomáš Hozza
bf377d81c1 Test/ostree-raw-image: test dirs and files customizations
Extend the `ostree-raw-image.sh` to use the directories and files
customizations for the raw image and test their effect using the ansible
playbook.

Custom files and directories are currently tested only on Fedora,
because they are allowed by policy only there.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-05-22 16:30:14 +02:00
Tomáš Hozza
956e3b9b69 Test: reformat parts of ostree-simplified-installer.sh
Reformat calls of `ansible-playbook` by splitting them into multiple
lines. This makes it easier to read.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-05-22 16:30:14 +02:00
Tomáš Hozza
34c1594216 Test: reformat parts of ostree-raw-image.sh
Break the execution of `ansible-playbook` into multiple lines to make it
easier to read.

Add a comment on top of the second `ansible-playbook` execution if
Ignitions is availble, explaining what differs. Otherwise this is hard
to spot.

There are 3 places in the script, where there are always 2 executions of
the `ansible-playbook`. First the user from the BP is used. On the
second run, the user created by Ignition is used. This was not the case
for the last 2 executions of `ansible-playbook` at the end of the
script. Adjust the order for consistency with the rest of the script.

The changes should have no effect on the test case.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-05-22 16:30:14 +02:00
Alexander Todorov
603c44061c Workaround race condition in test
by probbing if the repository is already available via HTTP
2023-05-22 12:59:09 +02:00
Tomáš Hozza
39f42699d2 test/aws.sh: verify AMI boot mode
Extend the Weldr API AWS test to verify the boot mode of the uploaded
AMI.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-05-19 13:24:39 +02:00
Tomáš Hozza
4afc5f58d0 test/api.sh/aws: verify AMI boot mode
Extend the Cloud API AWS test case to verify the uploaded AMI boot mode.
For informational purposes, also log the boot mode of the instance
created using the AMI by the test case.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-05-19 13:24:39 +02:00
jabia99
7224c896b6 Pass JIRA_PAT env variable to container 2023-05-15 12:18:40 +03:00
Ondřej Budai
156c411836 ostree-simplified-installer.sh: fix waiting loop for fdouser
`ssh grep fdouser /etc/passwd` returns 1 if the user doesn't exist yet.
We run this script with set -euo pipefail, which cause the script to exit
immediately. Thus, the waiting loop isn't actually waiting for anything.

By adding `|| true`, we ensure that the loop is indeed waiting for the fdouser
to be available.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2023-05-12 11:02:49 +02:00
Sanne Raymaekers
c7d2eaa5f7 test: use non-deprecated gitlab CI variables
CI_BUILD_ID was replaced with CI_JOB_ID in gitlab 9+.
2023-05-12 11:02:49 +02:00
Mario Cattamo
54ce49a852 Test fedora minimal embedded container 2023-04-27 14:01:44 +02:00
Gianluca Zuccarelli
1c25d2792c tests/api: custom repository tests
- remove `custom-repos.sh` integratoin test
- add custom repositories check to `api` tests for supported
  images
- verify custom repositores are added to /etc/yum.repos.d
- verify gpg key is saved to /etc/pki/rpm-gpg (for inline keys)
2023-04-26 14:16:16 +01:00
Alexander Todorov
72d33c8651 Don't execute test on osbuild-composer < 81
New functionality introduced in
https://github.com/osbuild/osbuild-composer/pull/3228
2023-04-25 18:33:37 +02:00
Antonio Murdaca
01e7370c08 test/simplified-installer: fix yq installation on rhel8
Basically use the latest 3.2.1 version because of https://github.com/kislyuk/yq/issues/165

Signed-off-by: Antonio Murdaca <runcom@linux.com>
2023-04-24 14:14:15 +02:00
Gianluca Zuccarelli
e271d1d30d test/cases: add custom repos integration test
Add an integration test for the custom repos feature.
The file resolve feature is also tested as part of this
test.
2023-04-21 17:40:00 +02:00
Alexander Todorov
2c23894e2a Conditionally skip container test when using older osbuild version
Introduced in
https://github.com/osbuild/osbuild-composer/pull/3336
2023-04-20 13:22:29 +02:00
Achilleas Koutsou
03b093acb0 test/container-embedding: add checks for container names
Add a local name for the fedora minimal image which includes the tag
`v1`.

Check the image info for the expected names:
1. For the fedora-minimal image, the name as it appears in the blueprint
   should be included in the names list.
2. For the manifest-list-test image, the full source reference should be
   included in the names list since no name was specified in the
   blueprint.
2023-04-19 20:07:40 +02:00
Achilleas Koutsou
d936a8722d test/container-embedding: add container with manifest-list
Add a second container to the container-embedding test.  The digest
refers to a manifest-list to test the new feature.
2023-04-17 18:30:41 +02:00
Alexander Todorov
0330e9c3e1 More robust filtering for unrecognized distros
in order to preserve the value `rhel-93` as unrecognized when
running on 9.2 nightly CI
2023-04-14 10:26:09 +03:00
Alexander Todorov
5cd73ad946 Don't fail cross-distro.sh on nightly CI pipeline
when it discovers "missing distros" b/c this check isn't suitable for
downstream RHEL anyway. See comment in script for more details!

Related: COMPOSER-1943
2023-04-14 10:26:09 +03:00
yih
b90f51ff33 fix cs9 edge-simplified-installer test failure 2023-04-13 21:39:32 +02:00
Gianluca Zuccarelli
da2e80f99f test/cases: update old worker regression version
Update the version of the worker in the old worker/new composer
regression test. The test, up until now, was using a pinned version
of osbuild-worker (v51) which made use of dnf-json as a socket.
Testing a new composer version with such an outdated worker instance
is very unrealistic since the workers and composer are normally
updated in lock step, or in some cases the worker may be a version
behind.

This commit takes the current worker version and then downgrades it
to two versions ago (out of caution) to perform the tests. This
provides a more realistic scenario.
2023-04-12 15:48:03 +02:00
Alexander Todorov
4890884a0e Parse modules info JSON according to weldr-client version 2023-04-06 09:32:10 +03:00
Alexander Todorov
5e6d47e9d0 Sign RPM package during testing and verify GPG signatures
Related: RHBZ#2177699
2023-04-03 17:36:42 +02:00
Alexander Todorov
58cb12eeaa Fix typo in custom repository field 2023-04-03 17:36:42 +02:00
Juan Abia
e3594f7234 Start using CIV config file
This way, all CIV parameters can be provided from a file stored in
gitlab secrets without the need to change the script.
2023-03-24 23:10:55 +01:00
Mario Cattamo
00de277d3a Add Butane test and Ignition logs 2023-03-24 17:07:36 +01:00
Juan Abia
06d83d3c07 Change civ repo name 2023-03-21 11:56:57 +01:00
Jakub Rusz
ecd69ca25b tests/ostree: Change centos-8 BOOT_LOCATION to a working boot.iso
The latest boot.iso stopped working. Changing to an older version to
unblock CI. RHBZ#2180024 opened with this issue.
2023-03-20 17:59:20 -07:00
Sanne Raymaekers
861e1473d9 test/vmware: boot VMs with EFI and use SCSI as a disk controller
Since we use streamOptimized images everywhere, we no longer need to use
IDE and boot with bios. Let's test a more realistic scenario.
2023-03-15 10:37:21 +01:00
yih
4023b61e1a test fdo create user 2023-03-10 14:40:49 +01:00
yih
d7e2e5d740 add sysroot permission test 2023-03-09 18:54:06 +08:00
yih
266cfdcc44 fix ansible error on centos9 2023-03-02 16:03:11 +01:00
Alexander Todorov
e064c12449 Update test suite after rebase to weldr-client-35.9
in order to avoid failures in nightly pipelines b/c JSON format has
changed
2023-02-28 11:15:49 +01:00
Juan Abia
a761184725 Modify CIV options
With the previous method of passing options, we encountered some
problems when sending the options via an array.
2023-02-28 10:26:01 +01:00
Xiaofeng Wang
eaee7870ba test: Add user in simplified installer blueprint
Run ansible playbook with user configured in simplified installer
blueprint
2023-02-22 12:18:12 +01:00
Tomáš Hozza
19e38621c9 Test/ostree-ng: test dirs and files customizations
Test the directories and files customization with the ostree container
image type deployed using the (Anaconda-based) installer image.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-02-22 12:17:36 +01:00
Tomáš Hozza
3cf77187d6 Test: reformat parts of ostree-ng.sh
Reformat calls of `ansible-playbook` by splitting them into multiple
lines. This makes it easier to read.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-02-22 12:17:36 +01:00
Tomáš Hozza
6cd7892c47 Test/ostree: test dirs and files customizations
Test the directories and files customization with the ostree commit
image type.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-02-22 12:17:36 +01:00
Tomáš Hozza
50fc6cc29c Test: reformat part of ostree.sh
Split the call to `ansible-playbook` to multiple lines.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-02-22 12:17:36 +01:00
Tomáš Hozza
c528948b71 Test/API: use directories and files customization for supported images
Use directories and files customization in the compose request for image
types that support this customization (only ostree installer and raw
image do not support it).

Extend the instance verification to check for the custom directories and
files.

Extend the ostree commit verification to check for the custom
directories and files.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-02-22 12:17:36 +01:00