Commit Graph

15 Commits

Author SHA1 Message Date
Alexander Todorov de3f548025 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.

Cherry-picked from 04bc5e9e86

Related: rhbz#1825190
2020-07-28 14:21:47 -07:00
Lars Karlitski 3734129e67 tests: don't use beakerlib in blueprint
b/c for osbuild-composer beakerlib is not included in the
distributions we test on.

Cherry-picked from abcbbf3194

Related: rhbz#1825190
2020-07-28 14:21:47 -07:00
Lars Karlitski 8f860cc8a1 tests: don't depend on internal state of composer
Cherry-picked from 123827c90a

Related: rhbz#1825190
2020-07-28 14:21:47 -07:00
Alexander Todorov 6b2efa0da1 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

Cherry-picked from 7b08fa8838

Related: rhbz#1825190
2020-07-28 14:21:47 -07:00
Alexander Todorov b72bb63599 tests: Don't check example blueprints if we don't have to
ATM osbuild-composer doesn't ship example blueprints

Cherry-picked from d68e01b7e1

Related: rhbz#1825190
2020-07-28 14:21:47 -07: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
Alexander Todorov d538aa9176 New test: assert toml files in git workspace
export BLUEPRINTS_DIR for use in tests

Depending on the way the tests are run the directory may be a temporary
dir, or it may be the standard /var/lib/lorax/... path.

Related: rhbz#1714103
2019-09-02 15:00:25 +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
Alexander Todorov c9978b800c Add new sanity tests for blueprints
- verify SemVer .patch number will be automatically updated when
  we push the blueprint a second time without changing version
- verify show displays the content in TOML format and it matches
  what is on disk. Because of that also start with empty packages
  and groups fields in the initial toml. If they are missing they
  will be added automatically by lorax-composer and this simplifies
  the test
- verify delete works

Related: rhbz#1698368
2019-04-19 13:52:32 +03:00
Jiri Kortus e5fb0b3f37 Add test for starting compose with deleted blueprint
Related: rhbz#1699303
2019-04-17 13:41:42 +03: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 55bdb8a27a Backport cloud image tests to RHEL 8
Related: rhbz#1653934

note: for now use Fedora 28 for the Docker container until
CentOS 8 is released or we figure out how to use subscriptions
for official RHEL 8 images.
2019-01-11 14:37:01 -08:00
Brian C. Lane 0ad0a47968 Update cli tests to use composer-cli name
Related: rhbz#1635763
2018-10-08 16:22:20 -07:00
Brian C. Lane b1a2d635d0 Adjust the composer-cli tests for the rename to composer
Related: rhbz#1635763
2018-10-05 08:30:34 -07:00
Alexander Todorov 959589652b Execute bash tests for composer-cli
these are built on top of beakerlib and we use its internal
protocol to figure out the result without relying on the full
test runner that is tipically used inside of a RHEL environment!

Includes a disabled test snippet for Issue #460
2018-10-02 22:52:57 +02:00