boom-boot/tests/tests.yml

55 lines
1.8 KiB
YAML
Raw Normal View History

2019-05-09 10:21:15 +00:00
---
- hosts: localhost
roles:
- role: standard-test-source
tags:
- classic
- role: standard-test-basic
tags:
- classic
tests:
- testsuite_pre:
dir: .
# boom test suite requires LV to exist on the system. We create one in case there is not one...
# boom requires /boot/boom/hosts directory to exist on the host. Is this a bug or feature?
run: |
set -xv;
rm -rf testsuite &>/dev/null;
mkdir -p /boot/boom/hosts;
if [[ ! -b /dev/boomvg/root ]]; then dd if=/dev/zero of=/dev/shm/boompv bs=1M count=128 && PV=$(losetup --show -f /dev/shm/boompv) && vgcreate boomvg $PV && lvcreate -n root -L32M boomvg; fi
- testsuite:
# to run the testsuite against installed python modules, we should run
# outside of source directory. Let's copy tests into new directory...
dir: .
run: |
set -xv;
mkdir testsuite && cd testsuite && cp -R ../source/tests . && python3 -m unittest -v tests/[a-z]*.py
- cli:
dir: .
run: |
(
set -xve;
boom profile list;
boom profile create --name test --short-name test --os-version rhel8 --os-version-id rhel8 --uname-pattern el8;
boom profile list;
boom entry list;
PROFILE=$(boom profile list --name test --no-headings -o osid);
boom entry create --root-lv boomvg/root --title test --profile $PROFILE;
boom entry list;
boom entry delete --title test;
boom profile delete --name test;
)
- testsuite_post:
dir: .
run: |
set -xv;
vgremove -ff boomvg; losetup -D; rm -f /dev/shm/boompv
required_packages:
- boom-boot
- boom-boot-grub2
- lvm2