From e67187c38e4e5a97ab971554d8acf9466e9775c2 Mon Sep 17 00:00:00 2001 From: Magnus Ahltorp Date: Wed, 1 Mar 2017 17:04:39 +0100 Subject: Refactor tests --- tools/testcase1.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tools/testcase1.py') diff --git a/tools/testcase1.py b/tools/testcase1.py index fb081e5..a616841 100755 --- a/tools/testcase1.py +++ b/tools/testcase1.py @@ -192,11 +192,11 @@ def mergestatus(configfile, localconfigfile): def merge(expected=None, wait=0): rv = subprocess.call([toolsdir + "/merge", "--config", testdir + "/catlfish-test.cfg", - "--localconfig", testdir + "/catlfish-test-local-merge.cfg"]) + "--localconfig", testdir + "/catlfish-test-local-merge-1.cfg"]) if rv: return rv for i in range(10): - mergestatus(testdir + "/catlfish-test.cfg", testdir + "/catlfish-test-local-merge.cfg") + mergestatus(testdir + "/catlfish-test.cfg", testdir + "/catlfish-test-local-merge-1.cfg") if i < wait: sleep(1) continue @@ -214,6 +214,7 @@ for baseurl in baseurls: testgroup("cert1") result1 = do_add_chain(cc1, baseurls[0]) +result2 = do_add_chain(cc1, baseurls[0]) mergeresult = merge(expected=1) assert_equal(mergeresult, 0, "merge", quiet=True, fatal=True) @@ -224,9 +225,10 @@ for baseurl in baseurls: print_and_check_tree_size(1, baseurl) size_sth[1] = base64.b64decode(get_sth(baseurls[0])["sha256_root_hash"]) -result2 = do_add_chain(cc1, baseurls[0]) +result3 = do_add_chain(cc1, baseurls[0]) assert_equal(result2["timestamp"], result1["timestamp"], "timestamp") +assert_equal(result3["timestamp"], result1["timestamp"], "timestamp") mergeresult = merge(expected=1, wait=3) assert_equal(mergeresult, 0, "merge", quiet=True, fatal=True) -- cgit v1.1