1
0
mirror of https://github.com/deajan/obackup.git synced 2024-12-26 15:33:41 +01:00

Added merge test

This commit is contained in:
deajan 2016-08-30 16:24:30 +02:00
parent 9daa4c10bf
commit 35558cf48c

View File

@ -43,7 +43,7 @@ DATABASE_EXCLUDED="information_schema.sql.xz"
function oneTimeSetUp () { function oneTimeSetUp () {
source "$DEV_DIR/ofunctions.sh" source "$DEV_DIR/ofunctions.sh"
if grep "^IS_STABLE=YES" "$DEV_DIR/n_obackup.sh" > /dev/null; then if grep "^IS_STABLE=YES" "$DEV_DIR/n_obackup.sh"; then
IS_STABLE=yes IS_STABLE=yes
else else
IS_STABLE=no IS_STABLE=no
@ -100,10 +100,16 @@ function oneTimeTearDown () {
} }
function test_Merge () {
cd "$DEV_DIR"
./merge.sh
asserEquals "Merging" "0" $?
}
function test_FirstLocalRun () { function test_FirstLocalRun () {
# Basic return code tests. Need to go deep into file presence testing # Basic return code tests. Need to go deep into file presence testing
cd "$DEV_DIR" cd "$OBACKUP_DIR"
./n_obackup.sh tests/conf/local.conf > /dev/null ./obackup.sh dev/tests/conf/local.conf
assertEquals "Return code" "0" $? assertEquals "Return code" "0" $?
for file in "${FilePresence[@]}"; do for file in "${FilePresence[@]}"; do
@ -134,8 +140,8 @@ function test_FirstLocalRun () {
function test_SecondLocalRun () { function test_SecondLocalRun () {
# Only tests presence of rotated files # Only tests presence of rotated files
cd "$DEV_DIR" cd "$OBACKUP_DIR"
./n_obackup.sh tests/conf/local.conf > /dev/null ./obackup.sh dev/tests/conf/local.conf > /dev/null
assertEquals "Return code" "0" $? assertEquals "Return code" "0" $?
for file in "${DatabasePresence[@]}"; do for file in "${DatabasePresence[@]}"; do