diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/catlfish-test-local-merge.cfg | 15 | ||||
-rwxr-xr-x | test/scripts/light-system-test-prepare.sh | 1 | ||||
-rwxr-xr-x | test/scripts/light-system-test-start.sh | 9 | ||||
-rwxr-xr-x | test/scripts/light-system-test-stop.sh | 7 | ||||
-rw-r--r-- | test/scripts/testutils.sh | 1 |
5 files changed, 30 insertions, 3 deletions
diff --git a/test/catlfish-test-local-merge.cfg b/test/catlfish-test-local-merge.cfg index 273b68e..2931e6c 100644 --- a/test/catlfish-test-local-merge.cfg +++ b/test/catlfish-test-local-merge.cfg @@ -1,10 +1,23 @@ nodename: merge-1 +localnodes: + - merge-1 + paths: + configdir: . mergedb: mergedb + # TODO: https_certfile and https_keyfile not strictly necessary for primary merge + https_certfile: httpscert/httpscert-1.pem + https_keyfile: httpscert/httpskey-1.pem https_cacertfile: httpsca/demoCA/cacert.pem publickeys: publickeys logpublickey: keys/logkey.pem privatekeys: privatekeys verifycert_bin: ../bin/verifycert.erl.escript - known_roots: known_roots/ + knownroots: known_roots/ + +merge: + min-delay: 1 + dist-window-size: 2 + dist-sendlog-chunksize: 1 + dist-sendentries-chunksize: 1 diff --git a/test/scripts/light-system-test-prepare.sh b/test/scripts/light-system-test-prepare.sh index df45d25..bf1f1b8 100755 --- a/test/scripts/light-system-test-prepare.sh +++ b/test/scripts/light-system-test-prepare.sh @@ -71,6 +71,7 @@ for machine in ${MACHINES}; do \ mkdir -p machine/machine-${machine}/db touch machine/machine-${machine}/db/index && touch machine/machine-${machine}/db/newentries done +${top_srcdir}/tools/compileconfig.py --config ${top_srcdir}/test/catlfish-test.cfg --localconfig ${top_srcdir}/test/catlfish-test-local-merge.cfg ${top_srcdir}/tools/compileconfig.py --config ${top_srcdir}/test/catlfish-test.cfg --localconfig ${top_srcdir}/test/catlfish-test-local-merge-2.cfg ${top_srcdir}/tools/compileconfig.py --config ${top_srcdir}/test/catlfish-test.cfg --localconfig ${top_srcdir}/test/catlfish-test-local-signing.cfg test -x ${SOFTHSM} && ${SOFTHSM} --init-token --slot=0 --label=mylabel --so-pin=ffff --pin=ffff || true diff --git a/test/scripts/light-system-test-start.sh b/test/scripts/light-system-test-start.sh index 1623d7e..4520945 100755 --- a/test/scripts/light-system-test-start.sh +++ b/test/scripts/light-system-test-start.sh @@ -7,8 +7,15 @@ top_srcdir=$(cd $(dirname $0)/../..; pwd) . ${top_srcdir}/test/scripts/testutils.sh +start_node() { + node=$1 + node_app=$2 + ../bin/run_erl -daemon nodes/${node}/ nodes/${node}/log/ \ + "exec ../bin/erl -boot ${node_app} -config ${node}" +} + for node in ${ERLANGNODES}; do - (../bin/run_erl -daemon nodes/${node}/ nodes/${node}/log/ "exec ../bin/erl -config ${node}") + start_node $(echo $node | tr ':' ' ') done for i in 1 2 3 4 5 6 7 8 9 10; do echo "waiting for system to start" diff --git a/test/scripts/light-system-test-stop.sh b/test/scripts/light-system-test-stop.sh index 575ef38..0bf4374 100755 --- a/test/scripts/light-system-test-stop.sh +++ b/test/scripts/light-system-test-stop.sh @@ -7,6 +7,11 @@ top_srcdir=$(cd $(dirname $0)/../..; pwd) . ${top_srcdir}/test/scripts/testutils.sh -for node in ${ERLANGNODES}; do +stop_node() { + node=$1 ${top_srcdir}/tools/to_catlfish.py to_erl nodes/${node}/ "init:stop()" +} + +for node in ${ERLANGNODES}; do + stop_node $(echo $node | tr ':' ' ') done diff --git a/test/scripts/testutils.sh b/test/scripts/testutils.sh index e779e07..6879695 100644 --- a/test/scripts/testutils.sh +++ b/test/scripts/testutils.sh @@ -19,4 +19,5 @@ check_sth() { do_merge() { ${top_srcdir}/tools/merge --config ${top_srcdir}/test/catlfish-test.cfg --timing --localconfig ${top_srcdir}/test/catlfish-test-local-merge.cfg || fail "Merge failed" + sleep 5 # FIXME: Just wait for dist instead. } |