]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/encrypt-bug-test
0bba2c6185626a869c27371c5b44618c382c961a
[bacula/bacula] / regress / tests / encrypt-bug-test
1 #!/bin/sh
2 #
3 # Run a simple backup of untitled15.jpg that fails to
4 #  restore properly in bug #763 
5 #
6 TestName="encrypt-bug-test"
7 JobName=Crypto-bug
8 . scripts/functions
9 set_debug 0
10
11 scripts/cleanup
12 scripts/copy-crypto-confs
13 echo "${cwd}/encrypt-bug.jpg" >/tmp/file-list
14 echo "${cwd}/encrypt-bug.jpg" >${cwd}/tmp/restore-list
15 echo "${cwd}/encrypt-bug.txt" >>/tmp/file-list
16 echo "${cwd}/encrypt-bug.txt" >>${cwd}/tmp/restore-list
17 files="encrypt-bug.jpg encrypt-bug.txt"
18 mkdir -p ${cwd}/tmp/build
19 for i in ${files}; do
20    cp -p ${cwd}/encrypt-bug.* ${cwd}/tmp/build
21 done
22
23 change_jobname NightlySave $JobName
24 start_test
25
26 cat <<END_OF_DATA >tmp/bconcmds
27 @$out /dev/null
28 messages
29 @$out tmp/log1.out
30 label storage=File volume=TestVolume001
31 setdebug level=100 fd
32 run job=$JobName yes
33 wait
34 messages
35 @# 
36 @# now do a restore
37 @#
38 @$out tmp/log2.out
39 setdebug level=100 fd
40 restore where=${cwd}/tmp/bacula-restores storage=File
41 5
42 mark *
43 done
44 yes
45 wait
46 messages
47 @$out
48 quit
49 END_OF_DATA
50
51 run_bacula
52 sleep 2
53 check_for_zombie_jobs storage=File 
54 stop_bacula
55
56 du -s build
57 du -s tmp/bacula-restores/
58
59
60 check_two_logs
61 diff ${cwd}/tmp/build ${cwd}/tmp/bacula-restores/${cwd} 2>&1 >/dev/null
62 dstat=$?
63 end_test