#!/bin/sh
#
# Run a simple connection test
#   with the tray-monitor.
#
export estat
TestName="tray-monitor-connection-test-tls-psk"
. scripts/functions

scripts/cleanup
copy_configs

tray_monitor_binary="${bin}/bareos-tray-monitor"

start_test

# check if tray-monitor binary was built
if [ ! -f ${tray_monitor_binary} ]; then
    set_error "Could not find executable ${tray_monitor_binary}"
    end_test
    exit 1
fi

run_bareos
${tray_monitor_binary} -rc -c ${bin}/tray-monitor.conf
estat=$?
stop_bareos

end_test
