]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/fifo-test
Update
[bacula/bacula] / regress / tests / fifo-test
1 #!/bin/sh
2 #
3 # Attempt to backup from a fifo and restore to a fifo
4 #
5 TestName="fifo-test"
6 JobName=FIFOTest
7 . scripts/functions
8 set_debug 0
9
10 cwd=`pwd`
11 scripts/cleanup
12 #scripts/copy-test-confs
13 echo "/tmp/bfifo" >/tmp/file-list
14
15 rm -f /tmp/bfifo
16 # send a file into the fifo
17 file=encrypt-bug.jpg
18 cat ${file} >/tmp/bfifo&
19
20 start_test
21
22 cat <<END_OF_DATA >tmp/bconcmds
23 @$out /dev/null
24 messages
25 @$out tmp/log1.out
26 label storage=File1 volume=TestVolume001
27 run job=$JobName storage=File1 yes
28 wait
29 messages
30 quit
31 END_OF_DATA
32
33
34 run_bacula
35
36 cat <<END_OF_DATA >tmp/bconcmds
37 @$out /dev/null
38 messages
39 @# 
40 @# now do a restore
41 @#
42 @$out tmp/log2.out
43 restore where=${cwd}/tmp/bacula-restores select all storage=File1 done
44 yes
45 wait
46 messages
47 @$out
48 quit
49 END_OF_DATA
50
51 cat </tmp/bfifo >tmp/${file} &
52
53 run_bconsole
54
55 check_for_zombie_jobs storage=File1
56 stop_bacula
57
58 check_two_logs
59 diff ${file} tmp/${file}
60 dstat=$?
61 end_test