]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
Add test for rrd_first() 1169/head
authorWolfgang Stöggl <c72578@yahoo.de>
Mon, 4 Apr 2022 16:28:19 +0000 (18:28 +0200)
committerWolfgang Stöggl <c72578@yahoo.de>
Mon, 4 Apr 2022 16:28:19 +0000 (18:28 +0200)
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

index ac4f9c6ae093f78ac78d7cb0fee5848f9f3a927a..ea8c9bf599d54c9be4301680f0c4f2a237aa93da 100755 (executable)
@@ -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=