diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/plans/main.fmf b/plans/main.fmf new file mode 100644 index 0000000..1b14886 --- /dev/null +++ b/plans/main.fmf @@ -0,0 +1,24 @@ +discover: + how: fmf + dist-git-source: true + +execute: + how: tmt + +prepare: + - name: Install packages + how: install + package: + - stratisd + - stratis-cli + - lvm2 + - python3-pytest + - name: Enable Stratisd + how: shell + script: | + systemctl enable --now stratisd + - name: Enable CRB + how: shell + script: | + dnf install -y "dnf-command(config-manager)" ; + dnf config-manager --set-enabled crb || true diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index fe26eca..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,51 +0,0 @@ ---- -- 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... - run: | - set -xv; - rm -rf testsuite &>/dev/null; - 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 - - lvm2 diff --git a/tests/upstream/main.fmf b/tests/upstream/main.fmf new file mode 100644 index 0000000..5f5e5d6 --- /dev/null +++ b/tests/upstream/main.fmf @@ -0,0 +1,9 @@ +summary: Run boom upstream test suite +test: | + cd $TMT_SOURCE_DIR/boom-boot-*[0-9]/ + pytest -v --log-level=debug +require: +- boom-boot +- python3-pytest +- python3-devel +duration: 5m