Commit Graph

12 Commits

Author SHA1 Message Date
Brian C. Lane
e7cfd20ca3 tests: Split testing the image into a separate script
Nested virt is not reliable enough, especially on other arches, to rely
on for testing the created images. This moves the test code into
test_boot_* scripts to be run from inside the booted images.

It also adds copying the results of the build into
/var/tmp/test-results/, and includes the generated ssh key so that
whatever boots the image can also log in.

The tests/test_image.sh script has been added to handle running the
test_boot_* scripts without any of the extra lorax-composer specific
setup.

Cherry-picked from b8bf258a3c

Related: rhbz#1769525
2019-11-08 13:57:35 +02:00
Jiri Kortus
16daa25137 [tests] Use a function to wait for compose to finish
The function is meant to replace the duplicate pieces of code used in various
tests, the polling interval is unified to 20 seconds.

Cherry-picked from 836f0ddf

Related: rhbz#1769525
2019-11-08 13:57:35 +02:00
Brian C. Lane
3b0bb5718c tests: Use a loop to wait for VM and sshd to start
Related: rhbz#1733975
2019-11-05 11:30:56 +02:00
Brian C. Lane
ecc1ab705b tests: Add check to make sure the compose actually finished
Previously it was looping, waiting for FINISHED|FAILED but was not
actually failing the test if the compose failed to build.
This adds a function to check the status of the compose and calls it
after each compose.

(cherry picked from commit d0e947fe3b)

Related: rhbz#1724073
2019-09-11 14:16:27 +03:00
Alexander Todorov
dcb4c1a0e5 Backport Cockpit CI changes for RHEL 8
Notes:

- also install podman-docker
- on RHEL 8 there's no docker.service to start

Related: rhbz#1724073
2019-09-11 14:16:27 +03:00
Jiri Kortus
755e71b542 Add test for passing custom option on kernel command line
Related: rhbz#1687743
2019-04-29 12:52:22 +03:00
Jiri Kortus
81ad0509f2 Use verify_image function as a helper for generic tests
Related: rhbz#1704172
2019-04-29 12:52:22 +03:00
Alexander Todorov
07a64aab07 Change [[modules]] to [[packages]] in tests
> bcl: this should really be [[packages]] since [[modules]] is
> going to change to actual modules at some point

Related: rhbz#1698368
2019-04-19 13:52:32 +03:00
Jiri Kortus
5962533e56 Fixes for locked root account test
Fixes related to a few issues in the locked root account test I somehow
managed to overlook in the initial commit.

Related: rhbz#1698473
2019-04-17 13:39:39 +03:00
Jiri Kortus
9e0e2b718f Add checks for disabled root account
The root account checks are applied to generated and deployed images
to make sure that root account is locked, except for live ISO.

Related: rhbz#1626122
2019-03-29 23:13:01 +02:00
Alexander Todorov
551723816c Allow overriding $CLI outside test scripts
this will allow you to test against installed RPM like so:

    # export CLI="/usr/bin/composer-cli"
    # make test_images

If you already have lorax-composer running then you can directly
execute test scripts:

    # ./tests/cli/test_build_and_deploy_aws.sh

Related: rhbz#1678937
2019-03-15 11:03:38 +02:00
Alexander Todorov
e78e0e610c New test: Build qcow2 compose and test it with QEMU-KVM
Related: rhbz#1653934
2019-03-04 13:18:35 +02:00