Commit Graph

17 Commits

Author SHA1 Message Date
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
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
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
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
Lars Karlitski
ce3a277100 tests: Fail on script errors
Fixes #727
2019-06-04 14:07:36 +03:00
Jan Stodola
ed8a21a627 Use ansible instead of awscli
Not all parts of the script has been switched from awscli to ansible yet,
because the ansible aws modules do not support importing s3 object as snapshots.
(https://github.com/ansible/ansible/issues/53453)
Workaround using the image_location parameter of the ec2_ami ansible module
would mean adding extra code for generating AMI manifest with pre-signed
URLs.
2019-05-24 12:44:30 +03:00
Lars Karlitski
1e5a5921e3 tests: Source lib.sh from the right directory
When testing in one of the VMs, tests are in /tests. Source the lib from
a relative directory instead.
2019-05-24 00:23:21 +02: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
Jiri Kortus
596cba2255 Use verify_image function as a helper for generic tests 2019-05-07 12:36:32 +03:00
Jiri Kortus
655e7e40c0 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.
2019-03-22 12:06:34 +02: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
Jiri Kortus
57be7313c4 Make sure compose build tests run with SELinux in enforcing mode 2019-02-06 18:54:16 +01:00
Alexander Todorov
4b4f4bd0e0 Implicitly specify ssh key directory/files for testing
this is to work around identity/sudo problems
2018-12-03 11:36:29 +02:00
Alexander Todorov
ed63611cb7 [test] Clean up containers.json 2018-12-03 11:36:29 +02:00
Alexander Todorov
ab048947cb Teach AWS test to distinguish between RHEL and Fedora 2018-12-01 18:06:20 +02:00
Alexander Todorov
efaf2bf793 new test: build and deploy images on AWS 2018-10-30 00:28:18 +02:00