summaryrefslogtreecommitdiff
path: root/test/start_scorsh.sh
diff options
context:
space:
mode:
authorKatolaZ <katolaz@freaknet.org>2017-08-09 21:29:45 +0100
committerKatolaZ <katolaz@freaknet.org>2017-08-09 21:29:45 +0100
commit33b7c33ab447a0463e414c6cf8f9a2cd2d047a20 (patch)
treebaeaae3eca65536bbe17ad9fe196c7383eafd4da /test/start_scorsh.sh
parent231beb5c3fc50f40e31b9e00237c67f267188057 (diff)
added more tests about basic scorsh setup
Diffstat (limited to 'test/start_scorsh.sh')
-rwxr-xr-xtest/start_scorsh.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/start_scorsh.sh b/test/start_scorsh.sh
new file mode 100755
index 0000000..40a9754
--- /dev/null
+++ b/test/start_scorsh.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+. ./scorsh_functions
+
+## start the scorsh daemon
+cd ${SCORSH_APP}
+./scorshd -c scorsh_example.cfg &
+echo "$!" > scorsh.pid
+is_running=$(ps $(cat scorsh.pid) | grep -c scorshd )
+cd - >/dev/null
+check_fatal "[ \"${is_running}\" = \"1\" ]" $0 "start_scorshd"
+
+##check_fatal "[ 1 -eq 0 ]" $0 "exit_on_purpose"
+
+## check if workers were started
+cd ${SCORSH_APP}
+ret=$(grep -c "Workers started correctly" scorsh.log)
+cd - > /dev/null
+check_fatal "[ \"$ret\" = \"1\" ]" $0 "workers_started"
+
+## check if spooler was started
+cd ${SCORSH_APP}
+ret=$(grep -c "Spooler started correctly" scorsh.log)
+cd - > /dev/null
+check_fatal "[ \"$ret\" = \"1\" ]" $0 "spooler_started"
+
+return_results