#!/bin/bash
set -e
set -o pipefail
set -u

#shellcheck source=../../environment.in
. ./environment
#shellcheck source=../../scripts/functions
. "${BAREOS_SCRIPTS_DIR}"/functions

export TestName="$(get_test_name "$0")"

"${BAREOS_SCRIPTS_DIR}"/cleanup
"${BAREOS_SCRIPTS_DIR}"/setup

# Fill ${BackupDirectory} with data.
setup_data
# Extra backup data with number of files.
mkdir -p ${tmp}/backup-data-numbered-files
for i in $(seq 1000 2000); do
  echo $i >${tmp}/backup-data-numbered-files/${i}.txt
done

# Create a list of paths to backup,
# containing only simple file types.
echo "${BackupDirectory}/build" >"$tmp/file-list-simple"

bin/bareos start
bin/bareos status

print_debug "$(bin/bconsole <<<"status dir")"
