From e0f60230f358d1d768466d2b26cbebed983422bc Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Sun, 21 Nov 2010 17:47:54 +0100 Subject: [PATCH] regress: Update delta plugin to raise error if we get delta back melted --- regress/tests/delta-test | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/regress/tests/delta-test b/regress/tests/delta-test index 857888147d..19ee993ec8 100755 --- a/regress/tests/delta-test +++ b/regress/tests/delta-test @@ -38,15 +38,17 @@ label storage=File volume=TestVolume001 setdebug level=150 client=$CLIENT estimate job=$JobName level=Full setdebug level=50 client=$CLIENT -run job=$JobName yes +run job=$JobName comment="read 400 bytes of passwd" yes wait status client=$CLIENT messages -run job=$JobName level=Incremental yes +run job=$JobName comment="read 100 bytes of group" level=Incremental yes wait messages -status client=$CLIENT -run job=$JobName level=Incremental yes +run job=$JobName comment="read 100 bytes of hosts" level=Incremental yes +wait +messages +run job=$JobName comment="read 100 bytes of services" level=Incremental yes wait messages status client=$CLIENT @@ -85,18 +87,25 @@ check_two_logs stop_bacula -head -c 100 /etc/passwd > $tmp/source -diff -u $tmp/source $tmp/delta.txt > $tmp/d +head -c 50 /etc/passwd > $tmp/source +head -c 50 /etc/group >> $tmp/source +head -c 50 /etc/hosts >> $tmp/source +head -c 100 /etc/services >> $tmp/source +head -c 400 /etc/passwd | tail -c 150 >> $tmp/source + +diff -u $tmp/source $tmp/delta.OK.txt > $tmp/d if [ $? -ne 0 ]; then - print_debug "ERROR: delta.txt and source are different, restore failed" + print_debug "ERROR: delta.OK.txt and source are different, restore failed" dstat=1 fi -head -c 300 /etc/passwd > $tmp/source -diff -u $tmp/source $tmp/delta.OK.txt > $tmp/d +head -c 400 /etc/passwd > $tmp/source2 +diff -u $tmp/source2 $tmp/delta.txt > $tmp/d if [ $? -ne 0 ]; then - print_debug "ERROR: delta.OK.txt and source are different, restore failed" - dstat=2 + print_debug "ERROR: delta.txt and source2 are different, restore failed" + dstat=1 fi + + end_test -- 2.39.5