summaryrefslogtreecommitdiff
path: root/test/scripts/light-system-test-run-3.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/scripts/light-system-test-run-3.sh')
-rwxr-xr-xtest/scripts/light-system-test-run-3.sh28
1 files changed, 19 insertions, 9 deletions
diff --git a/test/scripts/light-system-test-run-3.sh b/test/scripts/light-system-test-run-3.sh
index f84317b..bb042d2 100755
--- a/test/scripts/light-system-test-run-3.sh
+++ b/test/scripts/light-system-test-run-3.sh
@@ -5,12 +5,22 @@ set -o errexit
top_srcdir=$(cd $(dirname $0)/../..; pwd)
-. ${top_srcdir}/test/test.shvars
-
-${top_srcdir}/tools/merge --config ${top_srcdir}/test/catlfish-test.cfg --localconfig ${top_srcdir}/test/catlfish-test-local-merge.cfg || (echo "Merge failed" ; false)
-${top_srcdir}/tools/check-sth.py ${BASEURL} --publickey=keys/logkey.pem --cur-sth=stored-sth --cafile httpsca/demoCA/cacert.pem
-python ${top_srcdir}/tools/submitcert.py --parallel=1 --store ${top_srcdir}/tools/testcerts/cert7.txt --check-sct --sct-file=submittedcerts-7 ${BASEURL} --publickey=keys/logkey.pem --cafile httpsca/demoCA/cacert.pem || (echo "Submission failed" ; false)
-${top_srcdir}/tools/merge --config ${top_srcdir}/test/catlfish-test.cfg --localconfig ${top_srcdir}/test/catlfish-test-local-merge.cfg || (echo "Merge failed" ; false)
-python ${top_srcdir}/tools/verifysct.py --sct-file=submittedcerts --parallel 1 ${BASEURL} --publickey=keys/logkey.pem --cafile httpsca/demoCA/cacert.pem || (echo "Verification of SCT:s failed"; false)
-python ${top_srcdir}/tools/verifysct.py --sct-file=submittedcerts-7 --parallel 1 ${BASEURL} --publickey=keys/logkey.pem --cafile httpsca/demoCA/cacert.pem || (echo "Verification of SCT:s failed"; false)
-${top_srcdir}/tools/check-sth.py ${BASEURL} --publickey=keys/logkey.pem --cur-sth=stored-sth --cafile httpsca/demoCA/cacert.pem
+. ${top_srcdir}/test/scripts/testutils.sh
+
+do_merge
+check_sth
+
+assert_equal "Tree size" "$(get_treesize)" 8
+
+python ${top_srcdir}/tools/submitcert.py --parallel=1 --store ${top_srcdir}/tools/testcerts/cert7.txt --check-sct --sct-file=submittedcerts-7 ${BASEURL} --publickey=keys/logkey.pem --cafile httpsca/demoCA/cacert.pem || fail "Submission failed"
+
+assert_equal "Tree size" "$(get_treesize)" 8
+
+do_merge
+
+assert_equal "Tree size" "$(get_treesize)" 9
+
+python ${top_srcdir}/tools/verifysct.py --sct-file=submittedcerts --parallel 1 ${BASEURL} --publickey=keys/logkey.pem --cafile httpsca/demoCA/cacert.pem || fail "Verification of SCT:s failed"
+python ${top_srcdir}/tools/verifysct.py --sct-file=submittedcerts-7 --parallel 1 ${BASEURL} --publickey=keys/logkey.pem --cafile httpsca/demoCA/cacert.pem || fail "Verification of SCT:s failed"
+
+check_sth