From 3a6394158244df95263ba0b3cba2dc773ee5e69a Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Sun, 5 Jun 2022 09:06:19 +0200 Subject: [PATCH] fix tests --- tests-ng/import-with-trans.sh | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/tests-ng/import-with-trans.sh b/tests-ng/import-with-trans.sh index 4bb7d50..bcc26ea 100755 --- a/tests-ng/import-with-trans.sh +++ b/tests-ng/import-with-trans.sh @@ -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 '^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 "--------------" cat ${cfg} echo "--------------" -cat ${cfg} | grep -m 1 -A 4 'f_abc' | grep 'trans_write: base64' -cat ${cfg} | grep -m 1 -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_abc:' | grep 'trans_write: base64' +cat ${cfg} | grep -A 4 'd_def:' | grep 'trans_write: compress' +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 -m 1 -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_abc:' | grep 'trans_read: base64' +cat ${cfg} | grep -A 4 'd_def:' | grep 'trans_read: decompress' +cat ${cfg} | grep -A 4 'f_ghi:' | grep 'trans_read: decrypt' # install these +echo "install and check" rm ${tmpd}/abc rm -r ${tmpd}/def rm ${tmpd}/ghi @@ -149,12 +150,14 @@ rm ${tmpd}/ghi cd ${ddpath} | ${bin} install -f -c ${cfg} -p p1 -b -V # test exist +echo "check exist" [ ! -e ${tmpd}/abc ] && exit 1 [ ! -d ${tmpd}/def/a ] && exit 1 [ ! -e ${tmpd}/def/a/file ] && exit 1 [ ! -e ${tmpd}/ghi ] && exit 1 # test content +echo "check content" cat ${tmpd}/abc cat ${tmpd}/abc | grep "${token}" cat ${tmpd}/def/a/file