From f0602f50ac98aef79d427f8715614bfb2c7d6285 Mon Sep 17 00:00:00 2001 From: Mike FABIAN Date: Thu, 1 Jul 2021 13:19:59 +0200 Subject: [PATCH] Resolves: rhbz#1978233 Add CI tests and add gating.yaml --- .fmf/version | 1 + gating.yaml | 6 ++++++ plans/basic.fmf | 5 +++++ tests/main.fmf | 6 ++++++ tests/runtest.sh | 24 ++++++++++++++++++++++++ 5 files changed, 42 insertions(+) create mode 100644 .fmf/version create mode 100644 gating.yaml create mode 100644 plans/basic.fmf create mode 100644 tests/main.fmf create mode 100755 tests/runtest.sh 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/gating.yaml b/gating.yaml new file mode 100644 index 0000000..648918d --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - rhel-9 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/plans/basic.fmf b/plans/basic.fmf new file mode 100644 index 0000000..c1627f9 --- /dev/null +++ b/plans/basic.fmf @@ -0,0 +1,5 @@ +summary: Basic smoke test +discover: + how: fmf +execute: + how: tmt diff --git a/tests/main.fmf b/tests/main.fmf new file mode 100644 index 0000000..c674dd1 --- /dev/null +++ b/tests/main.fmf @@ -0,0 +1,6 @@ +test: ./runtest.sh +framework: beakerlib +duration: 10m +require: + - libreoffice-voikko + - libreoffice-core diff --git a/tests/runtest.sh b/tests/runtest.sh new file mode 100755 index 0000000..56dce98 --- /dev/null +++ b/tests/runtest.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm libreoffice-voikko + rlAssertRpm libreoffice-core + rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" + rlRun "pushd $tmp" + rlPhaseEnd + + rlPhaseStartTest + rlRun "unopkg list --bundled | grep 'Identifier.*voikko'" \ + 0 "Check whether the libreoffice-voikko extension is installed." + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $tmp" 0 "Remove tmp directory" + rlPhaseEnd +rlJournalEnd +