Introduce local boot test case for QCOW2
The tests works by executing osbuild with predefined pipeline. Then the image boots and the testing script creates SSH connection to the running VM. If everything goes fine `systemctl is-system-running` is executed with result `running` and the test case passed. The JSON definition of the test case contains also a blueprint that should generate the desired pipeline, but it didn't work for me, so I'm including it for future use from the golang unit tests.
This commit is contained in:
parent
3aab64575b
commit
77c2ab0e1c
6 changed files with 317 additions and 18 deletions
11
.travis.yml
11
.travis.yml
|
|
@ -19,4 +19,13 @@ matrix:
|
|||
script:
|
||||
# ubuntu's rpm package sets dbpath to ~/.rpmdb, which makes rpm fail...
|
||||
- sudo sh -c 'mkdir /etc/rpm; echo "%_dbpath /var/lib/rpm" > /etc/rpm/macros'
|
||||
- sudo env "PATH=$PATH" "OSBUILD_TEST_BUILD_PIPELINE=test/build-from-yum.json" test/run
|
||||
- sudo env "PATH=$PATH" "OSBUILD_TEST_BUILD_PIPELINE=test/build-from-yum.json" test/run --image-info
|
||||
# I know this looks stupid, but it actually enables the tests to run in parallel, so it takes less time
|
||||
- language: python
|
||||
python: 3.7
|
||||
env: PYTHONUNBUFFERED=1
|
||||
before_install: sudo apt-get install -y qemu-kvm
|
||||
script:
|
||||
# ubuntu's rpm package sets dbpath to ~/.rpmdb, which makes rpm fail...
|
||||
- sudo sh -c 'mkdir /etc/rpm; echo "%_dbpath /var/lib/rpm" > /etc/rpm/macros'
|
||||
- sudo env "PATH=$PATH" "OSBUILD_TEST_BUILD_PIPELINE=test/build-from-yum.json" test/run --boot-test
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue