#!/bin/bash
set -e
set -u
#trap read debug

TestName="$(basename "$(pwd)")"

export TestName
export estat

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

temporary_config_file="$config_directory_dir_additional_test_config/uncommented_string.conf"
bconsole_command_file="$tmp/bconsole_reload_command"
console_logfile="$tmp/console.log"

director_debug_level=""
#director_debug_level="-d 200"



############################################
start_test
############################################

#be sure no director is started
stop_director

#cleanup possible leftover from last run
${rscripts}/cleanup
remove_console_logfile

${rscripts}/setup
start_director

#reload modified config
add_uncommented_string_to_config
test_reload_will_not_crash_director
find_error_string_in_console_log 'This is an uncommented string that causes a config abort.'

stop_director

############################################
end_test
############################################
