mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-04 16:49:42 +00:00
fix tests
This commit is contained in:
@@ -128,20 +128,21 @@ cd ${ddpath} | ${bin} -p p1 -c ${cfg} files | grep '^f_abc'
|
|||||||
cd ${ddpath} | ${bin} -p p1 -c ${cfg} files | grep '^d_def'
|
cd ${ddpath} | ${bin} -p p1 -c ${cfg} files | grep '^d_def'
|
||||||
cd ${ddpath} | ${bin} -p p1 -c ${cfg} files | grep '^f_ghi'
|
cd ${ddpath} | ${bin} -p p1 -c ${cfg} files | grep '^f_ghi'
|
||||||
|
|
||||||
# check has trans_write in config
|
# check has trans_write and trans_read in config
|
||||||
echo "checking trans_write is set in config"
|
echo "checking trans_write is set in config"
|
||||||
echo "--------------"
|
echo "--------------"
|
||||||
cat ${cfg}
|
cat ${cfg}
|
||||||
echo "--------------"
|
echo "--------------"
|
||||||
cat ${cfg} | grep -m 1 -A 4 'f_abc' | grep 'trans_write: base64'
|
cat ${cfg} | grep -A 4 'f_abc:' | grep 'trans_write: base64'
|
||||||
cat ${cfg} | grep -m 1 -A 4 'd_def' | grep 'trans_write: compress'
|
cat ${cfg} | grep -A 4 'd_def:' | grep 'trans_write: compress'
|
||||||
cat ${cfg} | grep -m 1 -A 4 'f_ghi' | grep 'trans_write: encrypt'
|
cat ${cfg} | grep -A 4 'f_ghi:' | grep 'trans_write: encrypt'
|
||||||
|
|
||||||
cat ${cfg} | grep -m 1 -A 4 'f_abc' | grep 'trans_read: base64'
|
cat ${cfg} | grep -A 4 'f_abc:' | grep 'trans_read: base64'
|
||||||
cat ${cfg} | grep -m 1 -A 4 'd_def' | grep 'trans_read: decompress'
|
cat ${cfg} | grep -A 4 'd_def:' | grep 'trans_read: decompress'
|
||||||
cat ${cfg} | grep -m 1 -A 4 'f_ghi' | grep 'trans_read: decrypt'
|
cat ${cfg} | grep -A 4 'f_ghi:' | grep 'trans_read: decrypt'
|
||||||
|
|
||||||
# install these
|
# install these
|
||||||
|
echo "install and check"
|
||||||
rm ${tmpd}/abc
|
rm ${tmpd}/abc
|
||||||
rm -r ${tmpd}/def
|
rm -r ${tmpd}/def
|
||||||
rm ${tmpd}/ghi
|
rm ${tmpd}/ghi
|
||||||
@@ -149,12 +150,14 @@ rm ${tmpd}/ghi
|
|||||||
cd ${ddpath} | ${bin} install -f -c ${cfg} -p p1 -b -V
|
cd ${ddpath} | ${bin} install -f -c ${cfg} -p p1 -b -V
|
||||||
|
|
||||||
# test exist
|
# test exist
|
||||||
|
echo "check exist"
|
||||||
[ ! -e ${tmpd}/abc ] && exit 1
|
[ ! -e ${tmpd}/abc ] && exit 1
|
||||||
[ ! -d ${tmpd}/def/a ] && exit 1
|
[ ! -d ${tmpd}/def/a ] && exit 1
|
||||||
[ ! -e ${tmpd}/def/a/file ] && exit 1
|
[ ! -e ${tmpd}/def/a/file ] && exit 1
|
||||||
[ ! -e ${tmpd}/ghi ] && exit 1
|
[ ! -e ${tmpd}/ghi ] && exit 1
|
||||||
|
|
||||||
# test content
|
# test content
|
||||||
|
echo "check content"
|
||||||
cat ${tmpd}/abc
|
cat ${tmpd}/abc
|
||||||
cat ${tmpd}/abc | grep "${token}"
|
cat ${tmpd}/abc | grep "${token}"
|
||||||
cat ${tmpd}/def/a/file
|
cat ${tmpd}/def/a/file
|
||||||
|
|||||||
Reference in New Issue
Block a user