From 544f3d38c8a46763484d26e95900f27e20827776 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hozza?= Date: Mon, 17 Apr 2023 14:23:09 +0200 Subject: [PATCH] Test: rework FMF test metadata and test discovery for integration tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Do not execute test script in the test plan, but use TMT test discovery instead. Related: rhbz#2174845 Signed-off-by: Tomáš Hozza --- plans/integration-tests.fmf | 9 +++++---- tests/{scripts => image-build}/build-images.sh | 0 tests/image-build/main.fmf | 4 ++++ tests/{ => image-build}/manifests/centos-8.json | 0 tests/{ => image-build}/manifests/centos-9.json | 0 tests/{ => image-build}/manifests/fedora.json | 0 tests/{ => image-build}/manifests/rhel-8.json | 0 tests/{ => image-build}/manifests/rhel-9.json | 0 8 files changed, 9 insertions(+), 4 deletions(-) rename tests/{scripts => image-build}/build-images.sh (100%) create mode 100644 tests/image-build/main.fmf rename tests/{ => image-build}/manifests/centos-8.json (100%) rename tests/{ => image-build}/manifests/centos-9.json (100%) rename tests/{ => image-build}/manifests/fedora.json (100%) rename tests/{ => image-build}/manifests/rhel-8.json (100%) rename tests/{ => image-build}/manifests/rhel-9.json (100%) diff --git a/plans/integration-tests.fmf b/plans/integration-tests.fmf index 408417d..27dceee 100644 --- a/plans/integration-tests.fmf +++ b/plans/integration-tests.fmf @@ -1,9 +1,10 @@ -summary: Build simple image using osbuild +summary: Run osbuild integration tests prepare: how: install package: - osbuild +discover: + how: fmf + filter: tag:integration-test execute: - script: ./tests/scripts/build-images.sh ./tests/manifests - duration: 4h - + how: tmt diff --git a/tests/scripts/build-images.sh b/tests/image-build/build-images.sh similarity index 100% rename from tests/scripts/build-images.sh rename to tests/image-build/build-images.sh diff --git a/tests/image-build/main.fmf b/tests/image-build/main.fmf new file mode 100644 index 0000000..9db2bcb --- /dev/null +++ b/tests/image-build/main.fmf @@ -0,0 +1,4 @@ +summary: Build simple image using osbuild +tag: integration-test +duration: 1h +test: ./build-images.sh ./manifests diff --git a/tests/manifests/centos-8.json b/tests/image-build/manifests/centos-8.json similarity index 100% rename from tests/manifests/centos-8.json rename to tests/image-build/manifests/centos-8.json diff --git a/tests/manifests/centos-9.json b/tests/image-build/manifests/centos-9.json similarity index 100% rename from tests/manifests/centos-9.json rename to tests/image-build/manifests/centos-9.json diff --git a/tests/manifests/fedora.json b/tests/image-build/manifests/fedora.json similarity index 100% rename from tests/manifests/fedora.json rename to tests/image-build/manifests/fedora.json diff --git a/tests/manifests/rhel-8.json b/tests/image-build/manifests/rhel-8.json similarity index 100% rename from tests/manifests/rhel-8.json rename to tests/image-build/manifests/rhel-8.json diff --git a/tests/manifests/rhel-9.json b/tests/image-build/manifests/rhel-9.json similarity index 100% rename from tests/manifests/rhel-9.json rename to tests/image-build/manifests/rhel-9.json