From 3f78da19eefcf54745db8bce35eb71e28c7e29cb Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Mon, 2 Aug 2021 16:21:40 -0400 Subject: [PATCH] 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 --- gating.yaml | 6 ++++++ ...uster.conf => mod_proxy_cluster.conf.sample | 0 mod_proxy_cluster.spec | 6 +++--- tests/test.yml | 18 ++++++++++++++++++ 4 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 gating.yaml rename mod_proxy_cluster.conf => mod_proxy_cluster.conf.sample (100%) create mode 100644 tests/test.yml diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..648918d --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - rhel-9 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/mod_proxy_cluster.conf b/mod_proxy_cluster.conf.sample similarity index 100% rename from mod_proxy_cluster.conf rename to mod_proxy_cluster.conf.sample diff --git a/mod_proxy_cluster.spec b/mod_proxy_cluster.spec index f85eadc..2ec5197 100644 --- a/mod_proxy_cluster.spec +++ b/mod_proxy_cluster.spec @@ -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 diff --git a/tests/test.yml b/tests/test.yml new file mode 100644 index 0000000..19f2048 --- /dev/null +++ b/tests/test.yml @@ -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 '

Fedora Webserver Test Page

' 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