diff options
author | Linus Nordberg <linus@nordu.net> | 2015-09-25 19:49:39 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2015-09-25 19:49:39 +0200 |
commit | 5e01a05f5b0e8d71437ba4267db6aa3784a12a52 (patch) | |
tree | e78f8fe1868d29381eba4fa88b604f6a835c3315 /Makefile | |
parent | 300149c520921523f107537be5a3bb20fed829f0 (diff) |
Add a test for when merge backup fails.
Also, avoid tracebacks on ECONNREFUSED by catching urrllib2.URLError.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 19 |
1 files changed, 17 insertions, 2 deletions
@@ -104,6 +104,21 @@ tests-run: @(cd $(INSTDIR) && python ../tools/comparecert.py ../tools/testcerts/pre1.txt:../tools/testcerts/pre2.txt fetchcertstore/00000005:fetchcertstore/00000006) || (echo "Verification failed" ; false) @(cd $(INSTDIR) && python ../tools/storagegc.py --config ../test/catlfish-test.cfg --localconfig ../test/catlfish-test-local-1.cfg) || (echo "GC failed" ; false) + @./tools/to_catlfish.py to_erl test/nodes/merge-2/ "init:stop()" + @(cd $(INSTDIR) && python ../tools/submitcert.py --parallel=1 --store ../tools/testcerts/cert6.txt --check-sct --sct-file=submittedcerts $(BASEURL) --publickey=tests/keys/logkey.pem --cafile tests/httpsca/demoCA/cacert.pem) || (echo "Submission failed" ; false) + @echo NOTE: merge backup should fail with 111 Connection refused + @(cd $(INSTDIR) && ../tools/merge --config ../test/catlfish-test.cfg --localconfig ../test/catlfish-test-local-merge.cfg) || (echo "Merge failed" ; false) + @(cd $(INSTDIR) && treesize=$$(../tools/loginfo.py --config ../test/catlfish-test.cfg --localconfig ../test/catlfish-test-local-merge.cfg --treesize https://localhost:8080/) ; \ + test "$$treesize" = "7" || (echo "Tree size $$treesize != expected 7" ; false)) + @(cd $(INSTDIR) && bin/run_erl -daemon ../test/nodes/merge-2/ ../test/nodes/merge-2/log/ "exec bin/erl -config merge-2") + @for i in 1 2 3 4 5 6 7 8 9 10; do \ + echo "waiting for system to start" ; \ + sleep 0.5 ; \ + if curl -s --cacert $(INSTDIR)/tests/httpsca/demoCA/cacert.pem -4 https://localhost:8181 > /dev/null ; then break; fi ; \ + done + @(cd $(INSTDIR) && ../tools/merge --config ../test/catlfish-test.cfg --localconfig ../test/catlfish-test-local-merge.cfg) || (echo "Merge failed" ; false) + @(cd $(INSTDIR) && treesize=$$(../tools/loginfo.py --config ../test/catlfish-test.cfg --localconfig ../test/catlfish-test-local-merge.cfg --treesize https://localhost:8080/) ; \ + test "$$treesize" = "8" || (echo "Tree size $$treesize != expected 8" ; false)) tests-run2: @(cd $(INSTDIR) ; python ../tools/verifysct.py --sct-file=submittedcerts --parallel 1 $(BASEURL) --publickey=tests/keys/logkey.pem --cafile tests/httpsca/demoCA/cacert.pem) || echo "Verification of SCT:s failed" @@ -165,12 +180,12 @@ tests: @make tests-makemk @make tests-prepare @make tests-start - @make tests-run || (make tests-stop ; false) + @make tests-run || (sleep 5; make tests-stop ; false) @make tests-wait @make tests-stop @make tests-wait @make tests-start - @make tests-run2 || (make tests-stop ; false) + @make tests-run2 || (sleep 5; make tests-stop ; false) @make tests-wait @make tests-stop |