diff --git a/configs/status-schedule-test/bareos-dir.conf.status-schedule-test b/configs/status-schedule-test/bareos-dir.conf.status-schedule-test new file mode 100644 index 0000000..7a39ced --- /dev/null +++ b/configs/status-schedule-test/bareos-dir.conf.status-schedule-test @@ -0,0 +1,128 @@ +# +# Default Bareos Director Configuration file +# +# The only thing that MUST be changed is to add one or more +# file or directory names in the Include directive of the +# FileSet resource. +# +# You might also want to change the default email address +# from root to your address. See the "mail" and "operator" +# directives in the Messages resource. +# + +Director { # define myself + Name = localhost-dir + DIRPort = 8101 # where we listen for UA connections + QueryFile = "/root/bareos-regress/bin/query.sql" + WorkingDirectory = "/root/bareos-regress/working" + PidDirectory = "/root/bareos-regress/working" + SubSysDirectory = "/root/bareos-regress/working" + Maximum Concurrent Jobs = 4 + Password = "pNvX1WiXnwv2C/F7E52LGvw6rKjbbPvu2kyuPa9pVaL3" # Console password + Messages = Standard + Subscriptions = 1 +} + +JobDefs { + Name = "DefaultJob" + Type = Backup + Level = Incremental + Client = client + FileSet = FS_TESTJOB + Storage = File + Messages = Standard + Pool = Default + Priority = 10 + Maximum Concurrent Jobs = 16 + Schedule = TestSchedule +} + +Job { + Name = "BackupClient1" + JobDefs = "DefaultJob" +} + + +FileSet { + Name = FS_TESTJOB + Include { + File=${cwd}/tmp/file-list + +change_jobname $JobName +start_test + +cat <${cwd}/tmp/bconcmds +@$out ${cwd}/tmp/log1.out +messages +status scheduler +messages + +@$out ${cwd}/tmp/log2.out +status scheduler days=1 +messages + +@$out ${cwd}/tmp/log3.out +status scheduler days=-1 +messages + +@$out ${cwd}/tmp/log4.out +status scheduler schedule=TestSchedule +messages + +quit +END_OF_DATA + +run_bareos + +stop_bareos + + +NRLINES=`grep TestSchedule tmp/log1.out | wc -l` +if [ $NRLINES = "337" ]; then + print_debug "status scheduler OK" +else + estat=1 +fi + +NRLINES=`grep TestSchedule tmp/log2.out | wc -l` +if [ $NRLINES = "25" ]; then + print_debug "status scheduler days=1 OK" +else + estat=2 +fi + +NRLINES=`grep TestSchedule tmp/log3.out | wc -l` +if [ $NRLINES = "25" ]; then + print_debug "status scheduler days=-1 OK" +else + estat=3 +fi + +NRLINES=`grep TestSchedule tmp/log4.out | wc -l` +if [ $NRLINES = "338" ]; then + print_debug "status scheduler schedule=TestSchedule OK" +else + estat=4 +fi + + +stop_bareos + +#end_test