]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/auto-label-test
regress: tweak the message in the update_win32()
[bacula/bacula] / regress / tests / auto-label-test
1 #!/bin/sh
2 #
3 #  Test if Bacula can automatically create a Volume label.
4 #
5
6 TestName="auto-label-test"
7 JobName=AutoLabel
8 . scripts/functions
9
10 copy_test_confs
11
12 echo "${cwd}/build" >${cwd}/tmp/file-list
13
14 cp ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
15 sed "s%# Label Format%  Label Format%" ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
16
17 change_jobname CompressedTest $JobName
18 start_test
19
20 cat <<END_OF_SCRIPT >${cwd}/tmp/bconcmds
21 @$out /dev/null
22 messages
23 @$out ${cwd}/tmp/log1.out
24 status all
25 status all
26 list pools
27 messages
28 @#setdebug level=110 storage=File
29 run job=$JobName storage=File yes
30 list pools
31 list volumes
32 wait
33 sql
34 SELECT StartTime, JobFiles, JobId, Level, count(*) AS nb_jobmedia  
35 FROM JobMedia join Job using (JobId) join Client using (ClientId) 
36 where Client.Name = 'localhost-fd' group by JobId, Level, StartTime, 
37 JobFiles order by JobId desc ;
38
39 messages
40 @# 
41 @# now do a restore
42 @#
43 @$out ${cwd}/tmp/log2.out
44 @#setdebug level=400 storage=File
45 restore where=${cwd}/tmp/bacula-restores select storage=File
46 unmark *
47 mark *
48 count
49 ls *
50 dir *
51 find Makefile
52 pwd
53 lsmark
54 estimate
55 ?
56 help
57 done
58 yes
59 wait
60 messages
61 quit
62 END_OF_SCRIPT
63
64 run_bacula
65 check_for_zombie_jobs storage=File
66 stop_bacula
67
68 check_two_logs
69 check_restore_diff
70 end_test