Commit Graph

31 Commits

Author SHA1 Message Date
Alexander Todorov
556fdf3020 tests: Allow skipping image build in compose sanity test
when $SKIP_IMAGE_BUILD is set the test skips 2 phases:
- start the compose again (after it has been cancelled) and
- waiting for it to finish & downloading the resulting image

This will allow to enable this test script in downstream gating
jobs.
2020-07-28 10:28:05 -07:00
Alexander Todorov
27c4c67a59 tests: Don't check info after compose cancel with osbuild-composer
osbuild-composer doesn't remove cancelled composes and even if we
wait for the cancellation to take place the UUID is still there
and `compose info` returns an exit code of 0 instead of 1
2020-07-23 10:20:47 -07:00
Alexander Todorov
eb7748236c tests: Remove lorax-composer specific checks 2020-07-23 10:20:47 -07:00
Alexander Todorov
1c218ecbae tests: Remove compose after we're done 2020-07-23 10:20:47 -07:00
Lars Karlitski
123827c90a tests: don't depend on internal state of composer 2020-07-23 10:20:47 -07:00
Alexander Todorov
7b08fa8838 tests: Do not rely on example blueprints
- avoids having to modify them in the first place so less changes
  to the SUT
- will help with transition to osbuild-composer backend
- each test which needs a blueprint either declares it on its own
  (some already do this) or may use a shared blueprints from the
  tests lib dir
2020-07-23 10:20:47 -07:00
Alexander Todorov
4dd7cf8798 tests: Special case compose types for osbuild-composer
- alibaba - will be added later
- google - will be added later, low priority b/c
  GCE doesn't fully support RHEL8
- live-iso - not supported for now
- ext4 & partitioned disk - removed from osbuild-composer
2020-07-23 10:20:47 -07:00
Jakub Rusz
2ee92b75b0 tests: remove --test=2 from compose_sanity
This will ensure that the compose_sanity test also covers a scenario described in rhbz#1788501
2020-01-20 13:27:40 +02:00
Jakub Rusz
ca876483db tests: check for failed compose before trying to cancel
This was suggested and added to rhel8-branch so adding it here as well.
2020-01-14 11:23:56 +02:00
Brian C. Lane
b69e6d725d lorax-composer: Enable ami on aarch64 2020-01-13 14:55:41 -08:00
Alexander Todorov
59924fbafb AWS test: take into account different instance type for non x86
- also updates VM name used in playbook to be more descriptive
- also fix equality comparison to use == for consistency
2020-01-09 11:52:51 -08:00
Jakub Rusz
badc07854c Add test for canceling a running compose
This is a modification of an existing test for compose sanity.
2020-01-09 11:32:57 -08:00
Brian C. Lane
80dd997b9c composer-cli: Only display the available compose types
The enabled bool is now being used so the cli should only show the types
actually available on the architecture.

Also modifies the test in test_compose_sanity.sh

Related: rhbz#1751998
2019-12-10 12:17:34 -08:00
Jiri Kortus
836f0ddf7a [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.
2019-09-13 12:16:22 +03:00
Brian C. Lane
1581842132 tests: Drop sort from compose types test
The output from the API is already sorted, and 'sort' changes this
ordering in some situations.
2019-08-29 08:17:29 -07:00
Alexander Todorov
64ac615fa4 Revert "tests: Fix the order of liveimg-tar live-iso"
This reverts commit 3b6c6a35d7.
2019-08-29 08:17:29 -07:00
Brian C. Lane
3b6c6a35d7 tests: Fix the order of liveimg-tar live-iso 2019-08-20 17:23:08 -07:00
Brian C. Lane
b9d18216ef lorax-composer: Add liveimg-tar image type
This creates a tar suitable for use with the anaconda kickstart liveimg
command. It adds the kernel, grub2, and grub2-tools packages to the tar
template.
2019-08-05 14:50:32 -07:00
Brian C. Lane
d0e947fe3b 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.
2019-07-10 08:58:24 -07:00
Lars Karlitski
42c7c0691c Monkey-patch beakerlib to fail on first assert
Beakerlib upstream can't do this yet, but might at some point:

https://github.com/beakerlib/beakerlib/issues/42

This is only enabled in combination with the `--sit` option of the
`test/check-*` scripts. It leaves the system in exacly the state it was
in when an assertion failed. Finishing the test run would run cleanup as
well (such as deleting created images). It also takes longer.
2019-06-04 20:12:54 +02:00
Lars Karlitski
ce3a277100 tests: Fail on script errors
Fixes #727
2019-06-04 14:07:36 +03:00
Lars Karlitski
c261cec33d tests: Fail immediately when image build fails
We were checking for composer's FINISHED status only, which meant that
when a compose failed, the test ran until it timed out.

Check for failed as well. Also, always time out after 30 minutes.
2019-05-22 08:24:49 +02:00
Alexander Todorov
e45e645fd0 Add new test to verify compose paths exist
because they are mentioned in the official documentation
2019-04-15 21:53:24 +03:00
David Shea
44e14176bb Add a compose type for alibaba.
This compose type creates a partitioned disk as a qcow2 file, but with
only one partition instead of using a separate /boot.
2019-04-03 13:05:31 -04:00
David Shea
434fe58c28 Add a new compose type for Hyper-V
This is based on the VHD compose type, with the following differences:

  * Use the vhdx format instead of vhd
  * No WALinuxAgent
  * Install hyperv-daemons

The hyperv-daemons are activated through udev rules, so there is no need
to add them to the services line.
2019-04-03 13:00:37 -04:00
David Shea
bd804c271b Add a compose type for Google Compute Engine 2019-04-02 10:15:42 -04:00
Alexander Todorov
85dfbd7911 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
2019-03-10 21:29:55 +02:00
Brian C. Lane
98f8b23129 Add an openstack image type
This is a qcow2 image with cloud-init in the template.
2018-10-09 10:17:14 -07:00
Brian C. Lane
2a7a323ddf Update cli tests to use composer-cli name 2018-10-08 09:48:34 -07:00
David Shea
003108b15f Add new compose types to compose sanity test 2018-10-02 11:54:41 -04:00
Alexander Todorov
9736dff762 New cli test covering basic compose commands
- need to specify --sharedir so lorax-composer can find its
  kickstart files

- each test script writes results into a separate directory to
  avoid a passing test overwriting the results from a failing one.
  To avoid reporting failures in case of previously failing tests
  (e.g. during development) remove the temporary directories holding
  tets results before execution!
2018-09-24 22:28:57 +03:00