From 0d8a3f794974d24d7dcbe2f80347b395c2ccb217 Mon Sep 17 00:00:00 2001 From: Fabian Arrotin Date: Jun 13 2015 13:06:12 +0000 Subject: Modified the auditd test to be sure it's installed first (when installed with @core --nobase on c5) --- diff --git a/tests/p_audit/0_install_auditd.sh b/tests/p_audit/0_install_auditd.sh new file mode 100755 index 0000000..a3ffd88 --- /dev/null +++ b/tests/p_audit/0_install_auditd.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +# Install tests deps +t_Log "Running $0 - auditd" + + +t_InstallPackage auditd +t_ServiceControl auditd restart + diff --git a/tests/p_audit/1_auditd_running.sh b/tests/p_audit/1_auditd_running.sh new file mode 100755 index 0000000..bb050cd --- /dev/null +++ b/tests/p_audit/1_auditd_running.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# Author: Athmane Madjoudj + +t_Log "Running $0 - check if auditd is running." + +if [ $SKIP_QA_HARNESS -eq 1 ]; then + echo "Skipping this test ..." +else + service auditd status > /dev/null 2>&1 + t_CheckExitStatus $? +fi diff --git a/tests/p_audit/2_auditd_logging.sh b/tests/p_audit/2_auditd_logging.sh new file mode 100755 index 0000000..0207701 --- /dev/null +++ b/tests/p_audit/2_auditd_logging.sh @@ -0,0 +1,8 @@ +#!/bin/sh +# Author: Athmane Madjoudj + +t_Log "Running $0 - check if audit log is not empty." + +[[ -s /var/log/audit/audit.log ]] + +t_CheckExitStatus $? diff --git a/tests/p_audit/auditd_logging.sh b/tests/p_audit/auditd_logging.sh deleted file mode 100755 index 0207701..0000000 --- a/tests/p_audit/auditd_logging.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -# Author: Athmane Madjoudj - -t_Log "Running $0 - check if audit log is not empty." - -[[ -s /var/log/audit/audit.log ]] - -t_CheckExitStatus $? diff --git a/tests/p_audit/auditd_running.sh b/tests/p_audit/auditd_running.sh deleted file mode 100755 index bb050cd..0000000 --- a/tests/p_audit/auditd_running.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -# Author: Athmane Madjoudj - -t_Log "Running $0 - check if auditd is running." - -if [ $SKIP_QA_HARNESS -eq 1 ]; then - echo "Skipping this test ..." -else - service auditd status > /dev/null 2>&1 - t_CheckExitStatus $? -fi