summaryrefslogtreecommitdiff
path: root/tools/testcase1.py
diff options
context:
space:
mode:
authorMagnus Ahltorp <map@kth.se>2015-01-28 13:42:06 +0100
committerLinus Nordberg <linus@nordberg.se>2015-02-20 14:12:47 +0100
commit832dba2e1cd4e6e6ff9e8ea7afa98eebb44595e5 (patch)
tree5ad6f45daf3a4fd66c5d3c576dda857e147210ff /tools/testcase1.py
parent7d9413dcea9645cfa0f8887ac7536682ff5777f0 (diff)
Move hardcoded merge parameters to command line
Diffstat (limited to 'tools/testcase1.py')
-rwxr-xr-xtools/testcase1.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/tools/testcase1.py b/tools/testcase1.py
index 639cd69..415d475 100755
--- a/tools/testcase1.py
+++ b/tools/testcase1.py
@@ -120,16 +120,19 @@ def get_and_check_entry(timestamp, chain, leaf_index):
len(submittedcertchain),
len(submittedcertchain))
+def merge():
+ return subprocess.call(["./merge.py", "--baseurl", "https://127.0.0.1:8080/", "--frontend", "https://127.0.0.1:8082/", "--storage", "https://127.0.0.1:8081/", "--mergedb", "../rel/mergedb", "--keyfile", "../rel/test/eckey.pem"])
+
print_and_check_tree_size(0)
-mergeresult = subprocess.call(["./merge.py"])
+mergeresult = merge()
assert_equal(mergeresult, 0, "merge", quiet=True)
testgroup("cert1")
result1 = do_add_chain(cc1)
-mergeresult = subprocess.call(["./merge.py"])
+mergeresult = merge()
assert_equal(mergeresult, 0, "merge", quiet=True)
print_and_check_tree_size(1)
@@ -138,7 +141,7 @@ result2 = do_add_chain(cc1)
assert_equal(result2["timestamp"], result1["timestamp"], "timestamp")
-mergeresult = subprocess.call(["./merge.py"])
+mergeresult = merge()
assert_equal(mergeresult, 0, "merge", quiet=True)
print_and_check_tree_size(1)
@@ -152,7 +155,7 @@ testgroup("cert2")
result3 = do_add_chain(cc2)
-mergeresult = subprocess.call(["./merge.py"])
+mergeresult = merge()
assert_equal(mergeresult, 0, "merge", quiet=True)
print_and_check_tree_size(2)
@@ -164,7 +167,7 @@ testgroup("cert3")
result4 = do_add_chain(cc3)
-mergeresult = subprocess.call(["./merge.py"])
+mergeresult = merge()
assert_equal(mergeresult, 0, "merge", quiet=True)
print_and_check_tree_size(3)
@@ -177,7 +180,7 @@ testgroup("cert4")
result5 = do_add_chain(cc4)
-mergeresult = subprocess.call(["./merge.py"])
+mergeresult = merge()
assert_equal(mergeresult, 0, "merge", quiet=True)
print_and_check_tree_size(4)
@@ -191,7 +194,7 @@ testgroup("cert5")
result6 = do_add_chain(cc5)
-mergeresult = subprocess.call(["./merge.py"])
+mergeresult = merge()
assert_equal(mergeresult, 0, "merge", quiet=True)
print_and_check_tree_size(5)