Add gating and update tests
This commit is contained in:
parent
8d827c680c
commit
d35d88c5b5
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
|||||||
|
1
|
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
--- !Policy
|
||||||
|
product_versions:
|
||||||
|
- rhel-10
|
||||||
|
decision_context: osci_compose_gate
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
8
plans/all.fmf
Normal file
8
plans/all.fmf
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
summary: Run gating tests
|
||||||
|
discover:
|
||||||
|
how: fmf
|
||||||
|
dist-git-source: true
|
||||||
|
dist-git-type: centos
|
||||||
|
|
||||||
|
execute:
|
||||||
|
how: tmt
|
@ -6,10 +6,10 @@
|
|||||||
- role: standard-test-basic
|
- role: standard-test-basic
|
||||||
tags:
|
tags:
|
||||||
- classic
|
- 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:
|
required_packages:
|
||||||
- httpd
|
- httpd
|
||||||
- mod_intercept_form_submit
|
- mod_intercept_form_submit
|
||||||
|
tests:
|
||||||
|
- upstream:
|
||||||
|
dir: upstream
|
||||||
|
run: ./run_test.sh
|
||||||
|
6
tests/upstream/main.fmf
Normal file
6
tests/upstream/main.fmf
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
summary: Run mod_authnz_pam basic httpd tests
|
||||||
|
require:
|
||||||
|
- httpd
|
||||||
|
- mod_intercept_form_submit
|
||||||
|
test: ./run_test.sh
|
||||||
|
duration: 30m
|
36
tests/upstream/run_test.sh
Executable file
36
tests/upstream/run_test.sh
Executable file
@ -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
|
Loading…
Reference in New Issue
Block a user