Commit Graph

120 Commits

Author SHA1 Message Date
Chris Roberts 5165beef73 Switch VMware testing env to improve stability results
Related: rhbz#1825190
2020-08-04 10:14:42 -07:00
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 cc29b99659 Set BACKEND=osbuild-composer if running that test scenario
- this will execute cli sanity tests in parallel with the other
- make sure to pass BACKED to vm.install too
- more checks in lib.sh
2020-07-23 10:20:47 -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 04bc5e9e86 tests: Compare blueprints as TOML objects, not strings
this is to avoid differences in ordering and white space. The same
approach is used on rhel7-extras branch.
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 abcbbf3194 tests: don't use beakerlib in blueprint
b/c for osbuild-composer beakerlib is not included in the
distributions we test on.
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
Alexander Todorov d68e01b7e1 tests: Don't check example blueprints if we don't have to
ATM osbuild-composer doesn't ship example blueprints
2020-07-23 10:20:47 -07:00
Alexander Todorov 14a3c8d5a7 tests: Use BACKEND env variable instead of hard-coded values
- default BACKEND to lorax-composer
- pass BACKEND everywhere we need to
2020-07-23 10:20:47 -07:00
Alexander Todorov 0b5285a3e2 tests: Disable cloud-init status check
Fails on Fedora 32 and we are going to decommission this test
very soon, leaving only composer-cli related tests here. All image
building and verification tasks are already in the osbuild-composer
test suite!
2020-07-10 08:36:19 -07:00
Chris Roberts 1d5a0a378b Update datastore for VMware testing
This change is needed for VMWare testing due to changes in the storage,
and the datastore we used before is not available for the time being.
2020-04-15 12:25:27 +03:00
Alexander Todorov ad54403c6d tests: OpenStack - apply tags and delete by tags
- for keys use Composer-Test-Key prefix (for consistency)
- for images and VMs use Composer-Test prefix
- delete VMs both by searching by tags & by name in case we
  manually create them without tags
2020-02-12 14:58:11 +01:00
Alexander Todorov 354c909b9b tests: Azure - apply tags and delete by tags
- change image & vm names to Composer-Test-* for consistency
- tag vm with composer_test upon creation, timestamp is already present
- tag blobs with composer_test upon upload
- tag images with composer_test & first_seen timestamp upon creation
2020-02-12 14:58:11 +01:00
Alexander Todorov 06d727e4fd tests: VMware - delete only VMs named Composer-Test-*
- change VM name for consistency sake
- change vmdk file name also for consistency
2020-02-12 14:58:11 +01:00
Alexander Todorov d1d30bb974 tests: AWS - apply tags when creating resoures and delete by tags
- for objects in S3 - match filenames starting with Composer-Test
- for keys use the new Composer-Test-Key- prefix (for consistency)
- for VM names use Composer-Test-VM- prefix instead of ami id
2020-02-12 14:58:11 +01:00
Alexander Todorov e31fccc4ae tests: remove ALI_DIR after we're done using the cli
also fix typo
2020-01-30 08:47:38 -08:00
Alexander Todorov 718ac31c47 Test & cleanup script for Alibaba cloud 2020-01-28 13:48:57 +02:00
Jakub Rusz 67410a9770 tests: run ssh commands in batch mode 2020-01-24 14:27:31 +02: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 bae3cb06bc tests: Check for cloud-init presence in azure image
This tests if the cloud-init is installed and running.
2020-01-14 12:54:06 +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
Alexander Todorov 887fb6ce35 tests: Enable Elastic Network Adapter support for AWS
- this is required for arm64 but is present in all latest kernels
  so doesn't seem to hurt
- when registering the AMI mark its architecture properly
2020-01-13 15:36:20 -08: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
Alexander Todorov 2b578dcee8 tests: Ensure failure if beakerlib results file not found
In example here
https://209.132.184.41:8493/logs/pull-887-20191025-100505-509b9eae-weldr-lorax--fedora-31-tar/log.html

we're seeing stuff like:
/tests/test_cli.sh: line 109: /tmp/composer-test.wIAITH/TestResults: No such file or directory

but the result is PASS
2019-11-05 19:05:33 +02:00
Alexander Todorov b197e448ff DRY when setting up, running & parsing results for beakerlib tests 2019-11-05 19:05:33 +02:00
Brian C. Lane 89539a7bf4 tests: Use journalctl -g to check for failed login
/var/log/audit/audit.log isn't always available (eg. tar liveimg
install), but it is logged to the journal, which can be grepped with
'journalctl -g' so use that instead.
2019-11-01 09:00:57 -07:00
Brian C. Lane 454af0c5d5 tests: Fix check_root_account when used with tar liveimg test
passwd and openssh-clients need to be installed, and there is no need to
use sudo when you are connecting to the system as root.
2019-11-01 09:00:57 -07:00
Alexander Todorov d67745d755 tests: Use the same asserts as before
after the changes around live-iso and qcow2 test cases the asserts
used have also changed. This commit utilizes the existing test lib.
2019-11-01 09:00:57 -07:00
Alexander Todorov e1b45958f4 tests: switch to using podman instead of docker
Note: use podman-docker to avoid changing tests too much. This
is also what we have on the RHEL branches.

There's no service to be started/restarted so remove everything
related to docker service.
2019-11-01 09:00:57 -07:00
Brian C. Lane 4705ff3b1e tests: Remove nested vm from tar liveimg kickstart test
Use anaconda to install the root.tar.xz into a disk image.  Copy the
disk image to the host, and use the cockpit vm support to boot it and
test it.
2019-11-01 09:00:57 -07:00
Brian C. Lane a0ae10c2d7 tests: Use --http0.9 for curl ssh test 2019-11-01 09:00:57 -07:00
Brian C. Lane b8bf258a3c 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.
2019-11-01 09:00:57 -07:00
Alexander Todorov 88162780a7 tests: Document Azure setup 2019-10-21 19:46:37 +02:00
Jiri Kortus 5322664432 Add test for running composer with --no-system-repos option 2019-09-24 12:50:19 +03:00
Jiri Kortus f978d4b01c [tests] Use functions for starting and stopping lorax-composer 2019-09-24 12:50:19 +03:00
Alexander Todorov 8af9723c37 [tests] Collect compose logs after each build
- save compose logs under /var/log/$TEST
- save qemu logs under /var/log/$TEST/qemu.log
- download everything to $TEST_ATTACHMENTS so it can be saved
  in CI results
2019-09-13 12:16:22 +03: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
Alexander Todorov ea98969014 When launching AWS instances wait for the one we just launched
because the ec2.instances variable will return all that are
currently running
2019-09-11 10:46:53 +02:00
Jiri Kortus 421cc9c22f tests: Add kickstart tar installation test 2019-09-09 09:28:52 +02:00
Jiri Kortus 562eb0a15d tests: add option to disable kernel command line parameters check 2019-09-09 09:28:52 +02:00
Brian C. Lane beff4f6967 tests: Use a loop to wait for VM and sshd to start 2019-09-09 09:28:52 +02: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