[Fuego] [PATCH] logrotate: remove the test case using ntpdate.
Tim.Bird at sony.com
Tim.Bird at sony.com
Mon Dec 2 12:40:47 UTC 2019
See comments inline below
> -----Original Message-----
> From: Wang Mingyu
> Subject: [Fuego] [PATCH] logrotate: remove the test case using ntpdate.
>
This patch is missing a description in the commit message (body).
Please include a description in the body of every commit message.
> Signed-off-by: Wang Mingyu <wangmy at cn.fujitsu.com>
> ---
> 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
I don't know why logrotate_size.sh file was removed. This removal didn't
look related to the ntpdate removal. I discarded that part
of the patch.
Please explain why that file should be removed, and submit again
if the removal is still desired.
> @@ -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
I applied and pushed this patch to the master branch, without the removal
of the file logrotate_size.sh.
Thanks for the patch.
-- Tim
More information about the Fuego
mailing list