diff options
author | gramanas <anastasis.gramm2@gmail.com> | 2018-10-23 17:42:28 +0300 |
---|---|---|
committer | gramanas <anastasis.gramm2@gmail.com> | 2018-10-23 17:42:28 +0300 |
commit | 46421fedf6fe291bfcb63482f3bfa9bb2c7fdff6 (patch) | |
tree | 53d85f05c362230a428ca5593125ba1a1341799d /tests/01_add | |
parent | 410bb2715ce7c9f8d796704395cb44d76e2e884c (diff) | |
download | ck-46421fedf6fe291bfcb63482f3bfa9bb2c7fdff6.tar.gz ck-46421fedf6fe291bfcb63482f3bfa9bb2c7fdff6.tar.bz2 ck-46421fedf6fe291bfcb63482f3bfa9bb2c7fdff6.zip |
Remove site clutter and rename test folder (tests -> test)
Diffstat (limited to 'tests/01_add')
-rw-r--r-- | tests/01_add | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/tests/01_add b/tests/01_add deleted file mode 100644 index 1de64bf..0000000 --- a/tests/01_add +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash - -init add - -# setup test configs -echo "Test 1" > $BIN/test1.conf -echo "Test 2" > $BIN/test2.conf -echo "Test 3" > $BIN/test3.conf - -function run_add { - # add configs to ck - exec $BIN/ck -c $BIN add $1 $BIN/$2 $3 $4 > /dev/null & - wait $! - - if [ $? -ne 0 ]; then - err "ck crashed." - fi - - # check db - if [ "$(sqlite3 $BIN/ckdb "select name from program where name = '$1'")" != "$1" ]; then - err "$1 is not in the db." - fi - - if [ "$(sqlite3 $BIN/ckdb "select path from config where path = '$BIN/$2'")" != "$BIN/$2" ]; then - err "$2 is not in the db." - fi - - # check files - FOLDER=vc - if [[ "$3" = "-s" || "$4" = "-s" ]]; then - FOLDER=sec - fi - - if [ ! -f $TEST_LOCATION/$FOLDER/$1/$2 ]; then - err "$2 No move (add $3 $4)" - fi - - if [ ! -L $BIN/$2 ]; then - err "$2 No symlink (add $3 $4)" - fi -} - -run_add prog1 test1.conf -p -run_add prog2 test2.conf -s -run_add prog3 test3.conf -p -s - -clear_tests -echo -e $PASS |