Commit Graph

13 Commits

Author SHA1 Message Date
Brian C. Lane a0a76a800a Fix reporting of coverage results to coverall.io
When I re-arranged the test-in-docker I didn't realize how .travis.yml
was extracting the results. This should fix it.

When running with test-in-docker we mount the source read-only on
/linux-ro/ inside the container and copy it over to /lorax/ for running
the tests.

The local directory ./.test-results/ is mounted on /test-results/ in the
container and the .coverage file is copied into there so that it is
available on the host.

(cherry picked from commit b61a91954a)
2019-05-03 16:40:42 -07:00
Brian C. Lane 51a9c28bc6 Add tests for partitioned disk images
The setup for this is a bit complex, so it really ends up testing things
twice.

(cherry picked from commit fb4e6f2588)
2019-05-03 16:39:18 -07:00
Brian C. Lane e7310c7260 Add tests for pylorax.imgutils
Some of these can only run as root on a real system with access to loop
devices. They are skipped when running in a container.

(cherry picked from commit 063a1770e1)
2019-05-03 16:39:05 -07:00
Brian C. Lane 0aa206f661 Add tests to test_creator.py
Add a /.in-container file to the container root so that tests requiring root
and loop device support will be skipped when running in a container.

(cherry picked from commit bab4b20d0d)
2019-05-03 16:39:01 -07:00
Brian C. Lane ef45d169b0 Add some tests for creator.py
This is complicated by the fact that much of this module requires mount.
So for now just test the things that don't need mount.

(cherry picked from commit 134a333d92)
2019-05-03 16:38:47 -07:00
Brian C. Lane 4c71adadd5 Stop using build to run the tests, allow using podman
To use podman run the tests like this:
DOCKER=podman make test-in-docker

This now builds the welder/lorax-tests image as a separate step from
running the tests.

Running the tests uses the welder/lorax-tests image and mounts the
source directory read-only, copies it into /lorax-test/ and runs the
tests from there.

(cherry picked from commit 8a26d0648e)
2019-05-03 16:38:08 -07:00
Brian C. Lane 4192dfc709 Install python3-librepo in the test container
(cherry picked from commit e1dc54ea8c)
2018-10-29 14:13:05 -07:00
Brian C. Lane b35fe9d32a Add beakerlib to Dockerfile.test
Also kill the lorax-composer process and remove /run/weldr/api.socket
so that when this is run with podman you don't get an error about
attempting to tar up the socket.
2018-10-05 09:09:10 -07:00
Brian C. Lane 5184ccef9f Add a test for repo metadata expiration
This tests to make sure that the metadata timer is working (by setting
it to 10s and adding a new package to the repo), and that
DNFLock.lock_check immediately picks up a new package.

This depends on rpmfluff which is available from Fedora or EPEL repos.

Related: rhbz#1631561
2018-10-05 09:09:10 -07:00
Lars Karlitski 3cd4a3cb49 Also run `make check` on travis 2018-10-05 09:09:10 -07:00
Alexander Todorov e2e73973dc 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-05 09:09:10 -07:00
Brian C. Lane c7ba2e6231 Update Dockerfile.test to use f29 from fedora registry
Related: rhbz#1636207
2018-10-04 12:37:52 -07:00
Alexander Todorov 88139bcc03 Enable testing in Travis and collecting of coverage history 2018-04-26 22:33:34 +03:00