diff --git a/tests/roles/Test_Setup/tasks/main.yml b/tests/roles/Test_Setup/tasks/main.yml new file mode 100644 index 0000000..5cad420 --- /dev/null +++ b/tests/roles/Test_Setup/tasks/main.yml @@ -0,0 +1,12 @@ +--- + +- name: Install required packages + dnf: + name: > + httpd, mod_proxy_cluster + +- name: Comment out mod_proxy_balancer + command: sed -i 's@LoadModule proxy_balancer_module@#LoadModule proxy_balancer_module@g' /etc/httpd/conf.modules.d/00-proxy.conf + +- name: Configure mod_proxy_cluster + command: mv /etc/httpd/conf.d/mod_cluster.conf.sample /etc/httpd/conf.d/mod_cluster.conf diff --git a/tests/tests.yml b/tests/tests.yml index dad9646..f6cf666 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -3,14 +3,18 @@ tags: - classic roles: + - role: Test_Setup - role: standard-test-basic tests: - verify_httpd_up: dir: . run: "curl http://localhost/ &> testfile.log || true && grep 'Test Page' testfile.log" - - check_error_log: + - check_error_log_for_unexpected_errors: dir: . run: "! sudo grep -i error /var/log/httpd/error_log | grep -v \"AH01276\"" + - check_mod_proxy_cluster_configured: + dir: . + run: "grep -e \"mod_cluster/.* configured -- resuming normal operations\" /var/log/httpd/error_log" required_packages: - mod_proxy_cluster - httpd