From 6cbc1ead75a6cfed257449bed5f0716dc9e17c74 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wolfgang=20St=C3=B6ggl?= Date: Mon, 4 Apr 2022 18:28:19 +0200 Subject: [PATCH] Add test for rrd_first() Make use of existing test "create-from-template-1", which already creates, updates and dumps rrds and add a test for rrdtool first. - This is a test for issue #1140 --- tests/create-from-template-1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/create-from-template-1 b/tests/create-from-template-1 index ac4f9c6a..ea8c9bf5 100755 --- a/tests/create-from-template-1 +++ b/tests/create-from-template-1 @@ -33,6 +33,10 @@ rm -f ${PREFIX}*.rrd ${PREFIX}*.xml $RRDTOOL create ${PREFIX}ax1.rrd --start $(($ST-1)) --step 60 DS:a:GAUGE:120:0:U DS:b:COUNTER:120:0:U $RRA report createax1 +# Test rrd_first(), #1140 +RRD_FIRST=$($RRDTOOL first ${PREFIX}ax1.rrd) +[ $RRD_FIRST = 1299994020 ] ; report rrdtool first == $RRD_FIRST + cp ${BASE}ax1.rrd ${BASE}ax1-copy.rrd UPDATEAx1= -- 2.47.2