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.
31 lines
1.1 KiB
YAML
31 lines
1.1 KiB
YAML
dist: bionic
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- systemd-container
|
|
- qemu-utils
|
|
- yum
|
|
- gnupg2
|
|
matrix:
|
|
include:
|
|
- language: go
|
|
go: 1.12.x
|
|
env: GO111MODULE=on # needed even for Go 1.12
|
|
script: go test -v ./...
|
|
|
|
- language: python
|
|
python: 3.7
|
|
env: PYTHONUNBUFFERED=1
|
|
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 --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
|