Commit graph

10 commits

Author SHA1 Message Date
Juan Abia
c4fa4e4bb7 test: Replace hard coded ssh keys on some test
Generate a new ssh key each time. Only implemented on bash test scripts,
go tests pending.
2021-07-29 09:38:03 +03:00
Ondřej Budai
bc1a7dc30c tests: fix journalctl killing once again
3a8c6c8a introduced a new logic for killing journalctl. Unfortunately, it
doesn't work properly. In ostree tests, multiple journalctls are spawned
but there can be only one trap active at a time. This caused all but the last
journalctls to hang indefinitely. Unfortunately, hanging background processes
is something that causes the GitLab CI to hang indefinitely as well.

This commit modifies the logic a bit: The trap is still set. However, there's
also an explicit kill of journalctl after the compose is finished. After the
process is successfully killed, the trap is removed.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-06-10 07:40:36 +02:00
Jakub Rusz
3a8c6c8ab8 tests: kill journalctl even if compose fails
This prevents Gitlab CI from getting stuck if something
goes wrong with the compose.
2021-06-04 14:18:11 +03:00
Ondřej Budai
bb60905309 test/libvirt: remove dead code
We don't test vmdk images in libvirt.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-05-17 14:55:50 +02:00
Ondřej Budai
3bf04d12f8 test/libvirt: use a minimal blueprint
All our images now support and have enabled cloud-init, there's no need
to explicitly enable it and install it in a kickstart.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-05-17 14:55:50 +02:00
Jakub Rusz
8dcf859473 tests: move some integration tests to gitlab CI
This also includes several modifications to tests scripts to
enable them running in gitlab CI.
2021-05-12 15:38:30 +03:00
Alexander Todorov
ef0105945a tests: Revert a lorax patch
BZ 1843704 has been fixed and shipped in 8.3. We shouldn't need this
patch anymore!
2021-04-22 15:03:42 +03:00
Ondřej Budai
e7b3063f7e test: properly kill journalctl
sudo journalctl -af -n 1 -u "${WORKER_UNIT}" &
WORKER_JOURNAL_PID=$!

In this snippet, WORKER_JOURNAL_PID is set to the PID of the sudo process.
Sudo doesn't propagate any signals - therefore the child process of sudo
(journalctl in this case) isn't killed when a signal is sent to the parent.

Use pkill -P instead which kills all processes where sudo is the parent.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-04-14 09:18:06 +02:00
Ondřej Budai
54a458af5c test: replace genisoimage with mkisofs
genisoimage might be removed from RHEL 9. The users are advised to switch
to mkisofs tools from the xorriso package. It should be a drop-in replacement.

The same change was recently done by libguestfs:

efb8a766ca
2216ab2e32

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-04-02 14:21:29 +02:00
Ondřej Budai
cbc9082fac tests: move the libvirt test logic out of Jenkinsfile
All tests in /usr/libexec/tests/osbuild-composer should be able to run without
any arguments. This was not a case of libvirt.sh - it required two arguments
set by some Jenkinsfile logic.

This commit moves test/cases/libvirt.sh to tools/libvirt_test.sh and extracts
the logic controlling the test case from Jenkinsfile to test/cases/libvirt.sh.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2020-12-02 08:44:33 +01:00