From 117afbc241c27fbf83279216c01565fc11b591cd Mon Sep 17 00:00:00 2001 From: Scott Poore Date: Tue, 2 Jul 2024 20:20:24 -0500 Subject: [PATCH] Add gating and basic test --- .fmf/version | 1 + gating.yaml | 6 ++++++ plans/all.fmf | 8 ++++++++ tests/simple/main.fmf | 6 ++++++ tests/simple/run_test.sh | 11 +++++++++++ tests/tests.yml | 15 +++++++++++++++ 6 files changed, 47 insertions(+) create mode 100644 .fmf/version create mode 100644 gating.yaml create mode 100644 plans/all.fmf create mode 100644 tests/simple/main.fmf create mode 100755 tests/simple/run_test.sh create mode 100644 tests/tests.yml 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..4ca9235 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - rhel-10 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/plans/all.fmf b/plans/all.fmf new file mode 100644 index 0000000..d538d2d --- /dev/null +++ b/plans/all.fmf @@ -0,0 +1,8 @@ +summary: Run gating tests +discover: + how: fmf + dist-git-source: true + dist-git-type: centos + +execute: + how: tmt diff --git a/tests/simple/main.fmf b/tests/simple/main.fmf new file mode 100644 index 0000000..d1f9429 --- /dev/null +++ b/tests/simple/main.fmf @@ -0,0 +1,6 @@ +summary: Run mod_authnz_pam basic httpd tests +require: + - httpd + - mod_lookup_identity +test: ./run_test.sh +duration: 30m diff --git a/tests/simple/run_test.sh b/tests/simple/run_test.sh new file mode 100755 index 0000000..7587496 --- /dev/null +++ b/tests/simple/run_test.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +PKG="mod_lookup_identity" + +die () { + echo "$1" >&2 + exit 1 +} + +dnf list ${PKG} + diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..9513fd6 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,15 @@ +- hosts: localhost + roles: + - role: standard-test-source # Fetch source tarball and unpack it into the test environment, under directory "source/" + tags: + - always + - role: standard-test-basic + tags: + - classic + required_packages: + - httpd + - mod_lookup_identity + tests: + - simple: + dir: simple + run: ./run_test.sh