Add basic tier0 tests to verify that installing mod_proxy_cluster doesn't break httpd, and move the active conf file to a sample location

Related: #1964892
This commit is contained in:
Coty Sutherland 2021-08-02 16:21:40 -04:00
parent 8b4ca1909b
commit 3f78da19ee
4 changed files with 27 additions and 3 deletions

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

View File

@ -27,7 +27,7 @@ License: LGPLv3
Group: Applications/System
URL: http://www.jboss.org/
Source0: mod_cluster-%{commitid}.tar.gz
Source1: %{pkg_name}.conf
Source1: %{pkg_name}.conf.sample
Source2: %{pkg_name}.te
Source3: %{pkg_name}.fc
@ -90,7 +90,7 @@ install -d -m 755 $RPM_BUILD_ROOT/%{_localstatedir}/cache/mod_cluster
install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/
install -p -m 644 %{SOURCE1} \
$RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/mod_cluster.conf
$RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/mod_cluster.conf.sample
%if %with zip
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/jbossas-fordev
@ -135,7 +135,7 @@ fi
%doc lgpl.txt
%dir %{_localstatedir}/cache/mod_cluster
%attr(0755,root,root) %{aplibdir}/*
%config(noreplace) %{_sysconfdir}/httpd/conf.d/mod_cluster.conf
%{_sysconfdir}/httpd/conf.d/mod_cluster.conf.sample
# for SELinux
%dir %{_datadir}/selinux/packages/%{name}
%{_datadir}/selinux/packages/%{name}/mod_cluster.pp

18
tests/test.yml Normal file
View File

@ -0,0 +1,18 @@
- hosts: localhost
remote_user: root
tags:
- classic
roles:
- role: standard-test-basic
tests:
- verify_httpd_up:
dir: .
run: "curl http://localhost/ &> testfile.log || true && grep '<h1>Fedora Webserver <strong>Test Page</strong></h1>' testfile.log"
- check_error_log:
dir: .
run: "! sudo grep -i error /var/log/httpd/error_log | grep -v \"AH01276\""
required_packages:
- mod_proxy_cluster
- httpd
required_services:
- httpd