Skip to content

Commit

Permalink
systemtests: added systemtests for non-existing jobids in run command
Browse files Browse the repository at this point in the history
non existing job
  • Loading branch information
Hedi committed Jul 6, 2022
1 parent 6f0a614 commit 915e991
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions systemtests/tests/bareos/testrunner-run-non-existing-jobid
@@ -0,0 +1,41 @@
#!/bin/bash
set -e
set -o pipefail
set -u

# Run a job with a non existing jobid
TestName="$(basename "$(pwd)")"
export TestName


#shellcheck source=../environment.in
. ./environment

#shellcheck source=../scripts/functions
. "${rscripts}"/functions

start_test

run_log=$tmp/run.out
JobName=RestoreFiles

rm -f $run_log

cat <<END_OF_DATA >"$tmp/bconcmds"
@$out /dev/null
messages
@$out $run_log
setdebug level=100 storage=File
run job=$JobName jobid=999999 yes
wait
messages
quit
END_OF_DATA

run_bconsole

expect_grep "JobId 999999 not found in catalog." \
"$run_log" \
"The run command accepted a jobid that does not exist in the database."

end_test

0 comments on commit 915e991

Please sign in to comment.