Moved test oneTimeSetup code to execute for each test.

Now the conf file is created fresh for each test.
This commit is contained in:
Marcus Whybrow 2012-06-04 21:51:49 +01:00
parent 819d09b744
commit 330bc72d01

View File

@ -8,8 +8,11 @@ TMP_DIR="/tmp/msmtest"
oneTimeSetUp() {
# Variables used in tests
SCRIPT="${MSM_SCRIPT:-${DIR}/init/msm}"
export MSM_CONF="${TMP_DIR}/msm.conf"
export MSM_CONF="${TMP_DIR}/msm.conf"
}
setUp() {
source "$DEFUALT_CONF"
# Create the testing conf from the default one
@ -39,7 +42,7 @@ tearDown() {
# -------------
test_create_server_without_any_jargroups() {
$SCRIPT server create example
$SCRIPT server create example > /dev/null
source "$MSM_CONF"
assertTrue "Server was not created." '[ -d "$SERVER_STORAGE_PATH/example" ]'