From cbdba03f47950897cada526758855bd61c07edb9 Mon Sep 17 00:00:00 2001 From: Pavel Negrobov Date: Fri, 29 Mar 2024 11:08:55 +0300 Subject: [PATCH] inf-955 (#4) 9: https://dev-ci.inferitos.ru/job/rpmTests/job/Docker_tests/4054/ --- systemd https://dev-ci.inferitos.ru/job/rpmTests/job/Docker_tests/4055/ --- httpd 8: https://dev-ci.inferitos.ru/job/rpmTests/job/Docker_tests/4057/ --- systemd Co-authored-by: Pavel Negrobov Reviewed-on: https://git.inferitos.ru/msvsphere/QA/pulls/4 --- tests/p_httpd/0-install_httpd.sh | 8 -------- tests/p_httpd/httpd_centos_brand_server_tokens.sh | 8 -------- tests/p_httpd/httpd_centos_brand_welcome.sh | 8 -------- tests/p_httpd/httpd_msvsphere_brand_server_tokens.sh | 9 +++++++++ tests/p_httpd/httpd_msvsphere_brand_welcome.sh | 9 +++++++++ tests/p_httpd/httpd_servehtml.sh | 3 ++- tests/p_httpd/httpd_servehtml_ssl.sh | 4 +++- tests/p_systemd/001-prepare_environment.sh | 9 +++++++++ tests/p_systemd/20-systemctl_list-service-status.sh | 7 ++++++- 9 files changed, 38 insertions(+), 27 deletions(-) delete mode 100755 tests/p_httpd/httpd_centos_brand_server_tokens.sh delete mode 100755 tests/p_httpd/httpd_centos_brand_welcome.sh create mode 100755 tests/p_httpd/httpd_msvsphere_brand_server_tokens.sh create mode 100755 tests/p_httpd/httpd_msvsphere_brand_welcome.sh create mode 100755 tests/p_systemd/001-prepare_environment.sh diff --git a/tests/p_httpd/0-install_httpd.sh b/tests/p_httpd/0-install_httpd.sh index 429883a..06652b1 100755 --- a/tests/p_httpd/0-install_httpd.sh +++ b/tests/p_httpd/0-install_httpd.sh @@ -8,18 +8,10 @@ then php_mysql="php-mysqlnd" fi -#curl="curl" -#if [ $centos_ver -ge 8 ] & [ "$CONTAINERTEST" -eq "1" ] -#then -# curl="curl" -#fi - # Install tests deps # t_Log "Running $0 - httpd: installing $curl, http, php and $php_mysql" t_Log "Running $0 - httpd: installing http, php and $php_mysql" -#t_InstallPackage curl - # HTTPD / PHP # t_InstallPackage $curl httpd mod_ssl php $php_mysql t_InstallPackage httpd mod_ssl php $php_mysql diff --git a/tests/p_httpd/httpd_centos_brand_server_tokens.sh b/tests/p_httpd/httpd_centos_brand_server_tokens.sh deleted file mode 100755 index 2dd5cd3..0000000 --- a/tests/p_httpd/httpd_centos_brand_server_tokens.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -# Author: Athmane Madjoudj - -t_Log "Running $0 - httpd: centos branding / Server tokens value " - -curl -sI http://localhost/ | grep -i "Server:\ Apache.*\ (CentOS" > /dev/null 2>&1 - -t_CheckExitStatus $? diff --git a/tests/p_httpd/httpd_centos_brand_welcome.sh b/tests/p_httpd/httpd_centos_brand_welcome.sh deleted file mode 100755 index 6b42804..0000000 --- a/tests/p_httpd/httpd_centos_brand_welcome.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -# Author: Athmane Madjoudj - -t_Log "Running $0 - httpd: Welcome page has CentOS Branding." - -curl -s http://localhost/ | grep 'CentOS' > /dev/null 2>&1 - -t_CheckExitStatus $? diff --git a/tests/p_httpd/httpd_msvsphere_brand_server_tokens.sh b/tests/p_httpd/httpd_msvsphere_brand_server_tokens.sh new file mode 100755 index 0000000..d87be05 --- /dev/null +++ b/tests/p_httpd/httpd_msvsphere_brand_server_tokens.sh @@ -0,0 +1,9 @@ +#!/bin/sh +# Author: Athmane Madjoudj +# 27.03.2024 Pavel Negrobov -- адаптация для MSVSphere ОС + +t_Log "Running $0 - httpd: MSVSphere branding / Server tokens value " + +curl -sI http://localhost/ | grep -i "Server:\ Apache.*\ (MSVSphere" > /dev/null 2>&1 + +t_CheckExitStatus $? diff --git a/tests/p_httpd/httpd_msvsphere_brand_welcome.sh b/tests/p_httpd/httpd_msvsphere_brand_welcome.sh new file mode 100755 index 0000000..f14bb6e --- /dev/null +++ b/tests/p_httpd/httpd_msvsphere_brand_welcome.sh @@ -0,0 +1,9 @@ +#!/bin/sh +# Author: Athmane Madjoudj +# 27.03.2024 Pavel Negrobov -- адаптация для MSVSphere ОС + +t_Log "Running $0 - httpd: Welcome page has MSVSphere Branding." + +curl -s http://localhost/ | grep 'Инферит МСВСфера ОС' > /dev/null 2>&1 + +t_CheckExitStatus $? diff --git a/tests/p_httpd/httpd_servehtml.sh b/tests/p_httpd/httpd_servehtml.sh index 80325b2..a1f18f4 100755 --- a/tests/p_httpd/httpd_servehtml.sh +++ b/tests/p_httpd/httpd_servehtml.sh @@ -1,8 +1,9 @@ #!/bin/sh # Author: Athmane Madjoudj +# 27.03.2024 Pavel Negrobov -- адаптация для MSVSphere ОС t_Log "Running $0 - httpd: serve html page" -curl -H 'Accept-Language: en' -s http://localhost/ | grep 'Test Page' > /dev/null 2>&1 +curl -H 'Accept-Language: en' -s http://localhost/ | grep 'Тестовая страница HTTP-сервера' > /dev/null 2>&1 t_CheckExitStatus $? diff --git a/tests/p_httpd/httpd_servehtml_ssl.sh b/tests/p_httpd/httpd_servehtml_ssl.sh index a37699e..a9fe82f 100755 --- a/tests/p_httpd/httpd_servehtml_ssl.sh +++ b/tests/p_httpd/httpd_servehtml_ssl.sh @@ -1,8 +1,10 @@ #!/bin/sh # Author: Athmane Madjoudj +# 27.03.2024 Pavel Negrobov -- адаптация для MSVSphere ОС + t_Log "Running $0 - httpd: serve html page over SSL " -curl -H 'Accept-Language: en' -ks https://localhost/ | grep 'Test Page' > /dev/null 2>&1 +curl -H 'Accept-Language: en' -ks https://localhost/ | grep 'Тестовая страница HTTP-сервера' > /dev/null 2>&1 t_CheckExitStatus $? diff --git a/tests/p_systemd/001-prepare_environment.sh b/tests/p_systemd/001-prepare_environment.sh new file mode 100755 index 0000000..fd7111d --- /dev/null +++ b/tests/p_systemd/001-prepare_environment.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +echo "Подготовка окружения для тестирования пакета ${TEST_PACKAGE_NAME}" + +/bin/dnf -y install audit kexec-tools + +/bin/systemctl enable auditd + +exit 0 diff --git a/tests/p_systemd/20-systemctl_list-service-status.sh b/tests/p_systemd/20-systemctl_list-service-status.sh index 7a5ac70..d7edfb1 100755 --- a/tests/p_systemd/20-systemctl_list-service-status.sh +++ b/tests/p_systemd/20-systemctl_list-service-status.sh @@ -1,5 +1,10 @@ -#!/bin/bash +#!/bin/bash -x # Author: Rene Diepstraten +# 28.03.2024 Pavel Negrobov -- skip для MSVSphere ОС + +# https://inferitos.asproagile.ru/_module/agile/view/issue/1285 +t_Log "Running $0 - skip for MSVSphere. Please see https://inferitos.asproagile.ru/_module/agile/view/issue/1285" +exit 0 [ ${centos_ver} -lt 7 ] && exit t_Log "Running $0 - checking if systemctl can check a service status"