aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2018-11-20 13:49:36 +0200
committergramanas <anastasis.gramm2@gmail.com>2018-11-20 13:49:36 +0200
commitda31bfd28301d63571eccb4abdd6b0a65b05c621 (patch)
tree33e0054d00927bd9dcfaabad41fdea53624c7b8e /test
parent78ee1c72c670a71bfd165448676fc65bff802916 (diff)
downloadck-da31bfd28301d63571eccb4abdd6b0a65b05c621.tar.gz
ck-da31bfd28301d63571eccb4abdd6b0a65b05c621.tar.bz2
ck-da31bfd28301d63571eccb4abdd6b0a65b05c621.zip
Add export action, fix util_is_link bug
Diffstat (limited to 'test')
-rw-r--r--test/export.sh28
-rw-r--r--test/restore.sh4
2 files changed, 30 insertions, 2 deletions
diff --git a/test/export.sh b/test/export.sh
new file mode 100644
index 0000000..8daf76a
--- /dev/null
+++ b/test/export.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+init export
+
+# add configs to ck
+path1=$BIN/test1.conf
+path2=$BIN/test2.conf
+path3=$BIN/test3.conf
+path4=$BIN/test4.conf
+path5=$BIN/test5.conf
+
+add_config prog1 $path1
+add_config prog1 $path2
+add_config prog2 $path3
+add_config prog2 $path4
+add_config prog3 $path5
+
+# export
+exec $BIN/ck -c $BIN export >&${V} &
+wait $!
+
+if [ ! -f $BIN/ck.tar.gz ]; then
+ err "tar.gz was not created"
+fi
+
+rm $BIN/ck.tar.gz
+clear_tests
+echo -e $PASS
diff --git a/test/restore.sh b/test/restore.sh
index 2d60cb9..ba131e4 100644
--- a/test/restore.sh
+++ b/test/restore.sh
@@ -23,7 +23,7 @@ wait $!
for i in $($BIN/ck -c $BIN list -p prog1); do
if [[ ! -L "$i" ]]; then
- err "Couldn't restore path $i"
+ err "Couldn't restore path $i from -p prog1"
exit 1
fi
done
@@ -37,7 +37,7 @@ wait $!
for i in $($BIN/ck -c $BIN list paths); do
if [[ ! -L "$i" ]]; then
- err "Couldn't restore path $i"
+ err "Couldn't restore path $i from all"
exit 1
fi
done