diff options
author | gramanas <anastasis.gramm2@gmail.com> | 2018-10-19 13:06:27 +0300 |
---|---|---|
committer | gramanas <anastasis.gramm2@gmail.com> | 2018-10-19 13:06:27 +0300 |
commit | 18e6099230c3bfe23d4faeeae289554f127deb87 (patch) | |
tree | e395857e93a6f40a801aa97c8fd4e9349c72e824 /tests | |
parent | 147efc35461763c38e8875afac7bc44d2559204b (diff) | |
download | ck-18e6099230c3bfe23d4faeeae289554f127deb87.tar.gz ck-18e6099230c3bfe23d4faeeae289554f127deb87.tar.bz2 ck-18e6099230c3bfe23d4faeeae289554f127deb87.zip |
Add install script and config/verbose help
Diffstat (limited to 'tests')
-rw-r--r-- | tests/00_init | 2 | ||||
-rw-r--r-- | tests/01_add | 2 | ||||
-rw-r--r-- | tests/02_list | 4 | ||||
-rw-r--r-- | tests/03_delete | 14 | ||||
-rw-r--r-- | tests/04_search | 2 |
5 files changed, 12 insertions, 12 deletions
diff --git a/tests/00_init b/tests/00_init index 9ea2f1c..1f3f2a6 100644 --- a/tests/00_init +++ b/tests/00_init @@ -5,7 +5,7 @@ running init mkdir -p $TEST_LOCATION/vc mkdir $TEST_LOCATION/sec -exec $BIN/ck conf $BIN init $TEST_LOCATION/vc $TEST_LOCATION/sec > /dev/null & +exec $BIN/ck -c $BIN init $TEST_LOCATION/vc $TEST_LOCATION/sec > /dev/null & wait $! if [ $? -ne 0 ]; then diff --git a/tests/01_add b/tests/01_add index 74c9558..1de64bf 100644 --- a/tests/01_add +++ b/tests/01_add @@ -9,7 +9,7 @@ echo "Test 3" > $BIN/test3.conf function run_add { # add configs to ck - exec $BIN/ck conf $BIN add $1 $BIN/$2 $3 $4 > /dev/null & + exec $BIN/ck -c $BIN add $1 $BIN/$2 $3 $4 > /dev/null & wait $! if [ $? -ne 0 ]; then diff --git a/tests/02_list b/tests/02_list index 35bf1ee..e330dad 100644 --- a/tests/02_list +++ b/tests/02_list @@ -11,13 +11,13 @@ add_config prog1 $path1 add_config prog2 $path2 add_config prog3 $path3 -for i in $($BIN/ck conf $BIN list paths); do +for i in $($BIN/ck -c $BIN list paths); do if [[ "$i" != "$path1" ]] && [[ "$i" != "$path2" ]] && [[ "$i" != "$path3" ]]; then err "Listing paths" fi done -for i in $($BIN/ck conf $BIN list programs); do +for i in $($BIN/ck -c $BIN list programs); do if [[ "$i" != "prog1" ]] && [[ "$i" != "prog2" ]] && [[ "$i" != "prog3" ]]; then err "Listing programs" fi diff --git a/tests/03_delete b/tests/03_delete index ee1cdd6..1668576 100644 --- a/tests/03_delete +++ b/tests/03_delete @@ -15,10 +15,10 @@ add_config prog2 $path3 add_config prog2 $path4 # delete path1 -exec $BIN/ck conf $BIN del -c $path1 > /dev/null & +exec $BIN/ck -c $BIN del -c $path1 > /dev/null & wait $! -for i in $($BIN/ck conf $BIN list paths); do +for i in $($BIN/ck -c $BIN list paths); do if [[ "$i" == "$path1" ]]; then err "Couldn't delete path." exit 1 @@ -26,26 +26,26 @@ for i in $($BIN/ck conf $BIN list paths); do done # delete path2 (also prog1) -exec $BIN/ck conf $BIN del -c $path2 > /dev/null & +exec $BIN/ck -c $BIN del -c $path2 > /dev/null & wait $! -for i in $($BIN/ck conf $BIN list programs); do +for i in $($BIN/ck -c $BIN list programs); do if [[ "$i" == "prog1" ]]; then err "Removing all configs should delete the correspondig program." fi done # delete prog2 -exec $BIN/ck conf $BIN del prog2 > /dev/null & +exec $BIN/ck -c $BIN del prog2 > /dev/null & wait $! -for i in $($BIN/ck conf $BIN list paths); do +for i in $($BIN/ck -c $BIN list paths); do if [[ "$i" == "$path3" ]] || [[ "$i" == "$path4" ]]; then err "Removing the program should delete all it's configs." fi done -for i in $($BIN/ck conf $BIN list programs); do +for i in $($BIN/ck -c $BIN list programs); do if [[ "$i" == "prog1" ]]; then err "Couldn't remove program." fi diff --git a/tests/04_search b/tests/04_search index 9f3d2e5..c3600c1 100644 --- a/tests/04_search +++ b/tests/04_search @@ -14,7 +14,7 @@ add_config prog2 $path3 "search-term" add_config prog3 $path4 "search-term" # delete path1 -if [[ $($BIN/ck conf $BIN search search-term | wc -l) != 4 ]]; then +if [[ $($BIN/ck -c $BIN search search-term | wc -l) != 4 ]]; then err "search failed." fi |