From da61dbdf503e08b8015a2afb33632155e74360d6 Mon Sep 17 00:00:00 2001 From: Tiago Bueno Date: Mon, 12 May 2025 16:00:53 -0300 Subject: [PATCH] Add initial TMT Gating Test This adds a TMT plan for the gating test, which will currently run a smoke tests only that are defined in the ignition upstream repository: https://github.com/coreos/ignition Verify the upstream repository PR for additional refrence: https://github.com/coreos/ignition/pull/2076 JIRA: https://issues.redhat.com/browse/COS-2284 Signed-off-by: Tiago Bueno --- .fmf/version | 1 + gating.yaml | 2 +- tests/tests.yml | 2 ++ tests/tmt/plans/main.fmf | 16 ++++++++++++++++ tests/tmt/plans/smoke.fmf | 12 ++++++++++++ 5 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 .fmf/version create mode 100644 tests/tmt/plans/main.fmf create mode 100644 tests/tmt/plans/smoke.fmf 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 index b32a76a..f26ff0b 100644 --- a/gating.yaml +++ b/gating.yaml @@ -3,4 +3,4 @@ product_versions: - rhel-9 decision_context: osci_compose_gate rules: - - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} # this is the testcase identifier, which OSCI pipeline uses + - !PassingTestCaseRule {test_case_name: osci.brew-build./tests/tmt/plans/smoke} # this is the testcase identifier, which OSCI pipeline uses diff --git a/tests/tests.yml b/tests/tests.yml index 7239cf6..a2fba05 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -1,3 +1,4 @@ +--- - hosts: localhost roles: - role: standard-test-basic @@ -19,3 +20,4 @@ - ignition-validate-rpm-installed: dir: ./ run: /usr/bin/rpm -q ignition-validate + diff --git a/tests/tmt/plans/main.fmf b/tests/tmt/plans/main.fmf new file mode 100644 index 0000000..e43604f --- /dev/null +++ b/tests/tmt/plans/main.fmf @@ -0,0 +1,16 @@ +--- +adjust: + enabled: false + when: distro == centos-stream or distro == fedora +prepare: + - name: Install ignition package + when: use_built_form_src is not defined or use_built_form_src == false + how: install + package: ignition + - name: Set IGNITION_BIN_DIR when installed package + when: use_built_form_src is not defined or use_built_form_src == false + how: shell + script: | + set -x -e -o pipefail + echo "IGNITION_BIN_DIR=/usr/lib/dracut/modules.d/30ignition" > /tmp/ignition_bin_dir + diff --git a/tests/tmt/plans/smoke.fmf b/tests/tmt/plans/smoke.fmf new file mode 100644 index 0000000..6489a18 --- /dev/null +++ b/tests/tmt/plans/smoke.fmf @@ -0,0 +1,12 @@ +--- +summary: Run gating tests +tag: + - smoke +discover: + - name: Internal gating tests + how: fmf + url: https://github.com/coreos/ignition.git + filter: 'tag: smoke' +execute: + how: tmt +