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/tests.yml b/tests/tests.yml index 2815bb6..4fae989 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -6,10 +6,10 @@ - role: standard-test-basic tags: - classic - tests: - - simple: - dir: source - run: tests/config.sh && setsebool allow_httpd_mod_auth_pam 1 && systemctl start httpd && tail -f /var/log/httpd/*_log & tests/run.sh required_packages: - httpd - mod_intercept_form_submit + tests: + - upstream: + dir: upstream + run: ./run_test.sh diff --git a/tests/upstream/main.fmf b/tests/upstream/main.fmf new file mode 100644 index 0000000..8305e0f --- /dev/null +++ b/tests/upstream/main.fmf @@ -0,0 +1,6 @@ +summary: Run mod_authnz_pam basic httpd tests +require: + - httpd + - mod_intercept_form_submit +test: ./run_test.sh +duration: 30m diff --git a/tests/upstream/run_test.sh b/tests/upstream/run_test.sh new file mode 100755 index 0000000..3030346 --- /dev/null +++ b/tests/upstream/run_test.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +PKG="mod_intercept_form_submit" + +die () { + echo "$1" >&2 + exit 1 +} + +# If source not found, download it with dnf +if [ ! -d ./source ]; then + # Extract source from srpm + dnf download --source ${PKG} && \ + rpm2cpio ${PKG}*.rpm|cpio -id && \ + mkdir source && \ + tar -zxf ${PKG}-*.tar.gz -C source --strip-components=1 + if [ $? != 0 ]; then + echo "Failed to download upstream tests" + exit 1 + fi +fi + +pushd ./source || die "missing source directory" +rm -f ${PKG} tests/*.log 2>/dev/null +# ln -s /usr/bin/${PKG} || die "failed to link ${PKG} binary" + +FAIL=0 + +# run the tests +# +tests/config.sh +setsebool allow_httpd_mod_auth_pam 1 +systemctl start httpd +tail -f /var/log/httpd/*_log & +tests/run.sh +kill %1