[Fuego] [PATCH] logrotate: remove the test case using ntpdate.
Wang Mingyu <[email protected]>
| Newsgroups | dev.linux.lists.fuego |
|---|---|
| Message-ID | <[email protected]> |
Signed-off-by: Wang Mingyu <[email protected]> --- tests/Functional.logrotate/fuego_test.sh | 1 - .../tests/logrotate_rotation.sh | 4 +- .../tests/logrotate_size.sh | 39 ------------------- 3 files changed, 1 insertion(+), 43 deletions(-) delete mode 100644 tests/Functional.logrotate/tests/logrotate_size.sh diff --git a/tests/Functional.logrotate/fuego_test.sh b/tests/Functional.logrotate/fuego_test.sh index c6e0579..856871e 100644 --- a/tests/Functional.logrotate/fuego_test.sh +++ b/tests/Functional.logrotate/fuego_test.sh @@ -2,7 +2,6 @@ NEED_ROOT=1 function test_pre_check { assert_has_program logrotate - assert_has_program ntpdate assert_has_program date } diff --git a/tests/Functional.logrotate/tests/logrotate_rotation.sh b/tests/Functional.logrotate/tests/logrotate_rotation.sh index f0d5e92..75616b4 100644 --- a/tests/Functional.logrotate/tests/logrotate_rotation.sh +++ b/tests/Functional.logrotate/tests/logrotate_rotation.sh @@ -15,11 +15,9 @@ then mv /var/lib/logrotate.status /var/lib/logrotate.status_bak fi -ntpdate $test_host - cp data/test.conf /etc/logrotate.d/test.conf -touch /var/log/testlog +cp data/testlog100k /var/log/testlog cp data/testlog.sh data/testlog_test.sh chmod +x data/testlog_test.sh diff --git a/tests/Functional.logrotate/tests/logrotate_size.sh b/tests/Functional.logrotate/tests/logrotate_size.sh deleted file mode 100644 index 2e215cd..0000000 --- a/tests/Functional.logrotate/tests/logrotate_size.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -# Verify that the rotate file is created in the specified directory. -# option : -v - -test="log rotation size" - -if [ -f /var/log/testlog* ] -then - rm -f /var/log/testlog* -fi - -if [ -f /var/lib/logrotate.status ] -then - mv /var/lib/logrotate.status /var/lib/logrotate.status_bak -fi -cp data/test.conf /etc/logrotate.d/test.conf - -cp data/testlog100k /var/log/testlog - -cp data/testlog.sh data/testlog_test.sh -chmod +x data/testlog_test.sh -data/testlog_test.sh -chown root /etc/logrotate.d/test.conf -logrotate -v /etc/logrotate.d/test.conf -if ls /var/log/testlog.1 -then - echo " -> $test: TEST-PASS" -else - echo " -> $test: TEST-FAIL" -fi - -rm -f /etc/logrotate.d/test.conf -rm -f /var/log/testlog* -rm -f data/testlog_test.sh -if [ -f /var/lib/logrotate.status_bak ] -then - mv /var/lib/logrotate.status_bak /var/lib/logrotate.status -fi -- 2.17.1