lorax/test/check-cli
Lars Karlitski 250f49f78d Use Cockpit's test images and infrastructure
Allows to run the tests on multiple operating systems and on the
infrastructure that the Cockpit team maintains.

`make vm` downloads one of Cockpit's test images (override which one
with TEST_OS) and installs rpms build from the local checkout of lorax.
The resulting image is placed in `test/images/$TEST_OS`.

TEST_OS can be set to any of Cockpit's supported images (default:
fedora-30).

Run `make check-vm` to run the CLI checks in the VM. The bulk of the
work is done in `test/check-cli`, which uses Cockpit's `bots` library to
start the VM and run the script in it.

Also included is a `test/run` script, which is the entrypoint for
Cockpit's test infrastructure.
2019-05-20 20:24:01 +02:00

33 lines
871 B
Python
Executable File

#!/usr/bin/python3
import composertest
class TestSanity(composertest.ComposerTestCase):
def test_blueprint_sanity(self):
self.runCliTest("/tests/cli/test_blueprints_sanity.sh")
def test_compose_sanity(self):
self.runCliTest("/tests/cli/test_compose_sanity.sh")
class TestImages(composertest.ComposerTestCase):
def test_ext4_filesystem(self):
self.runCliTest("/tests/cli/test_compose_ext4-filesystem.sh")
def test_partitioned_disk(self):
self.runCliTest("/tests/cli/test_compose_partitioned-disk.sh")
def test_tar(self):
self.runCliTest("/tests/cli/test_compose_tar.sh")
def test_qcow2(self):
self.runCliTest("/tests/cli/test_compose_qcow2.sh")
def test_live_iso(self):
self.runCliTest("/tests/cli/test_compose_live-iso.sh")
if __name__ == '__main__':
composertest.main()