From 23346b27b8edac3fbe6f423a28064e1da180d6db Mon Sep 17 00:00:00 2001 From: Rasmus Dahlberg Date: Sun, 27 Mar 2022 15:16:29 +0200 Subject: integration: add automatic setup and tear-down --- integration/run | 87 --------------------------------------------------------- 1 file changed, 87 deletions(-) delete mode 100755 integration/run (limited to 'integration/run') diff --git a/integration/run b/integration/run deleted file mode 100755 index f9045dc..0000000 --- a/integration/run +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/bash - -# -# You will need to configure Trillian locally on your test machine. See -# -# cmd/sigsum_log_go/README.md. -# -# for some pointers. Ensure that trillian_log_server and trillian_log_signer -# are in $GOPATH, and set the appropriate Trillian id in start_sigsum_server. -# -# You will also need to install into your $GOPATH: -# -# go build -o $GOPATH/bin/sigsum_log_go cmd/sigsum_log_go/main.go -# go build -o $GOPATH/bin/sigsum_keygen cmd/tmp/keygen/main.go -# go build -o $GOPATH/bin/cosign cmd/tmp/cosign/main.go -# go build -o $GOPATH/bin/submit cmd/tmp/submit/main.go -# -# Run the test as follows: -# -# 1. integration/start_tlog_seq # "terminal 1" -# 2. integration/start_tlog_serv # "terminal 2" -# 3. integration/start_sigsum_serv # "terminal 3" -# 4. integration/run # "terminal 4" -# -# What you expect to see is if the different endpoints function. -# -# - There is a to-cosign tree head -# - Submitting four entries work -# - Adding a cosignature works -# - Cosigned tree head is not available (waiting for rotate) -# - Experimental checkpoint works -# - Consistency proof works -# - Fetching entries work -# - Cosigned tree head is available (tree heads rotated) -# -# Warning: it is assumed that there are at least 4 leaves in the database. -# Warning: the get-inclusion-proof endpoint is not poked. -# Warning: this needs to be replaced, see issues/add-integration-test.md. -# - -. "$(dirname $0)/config" - -now=$(date +%s) -url=http://localhost:6965/testonly/sigsum/v0 -shard_hint=$(date +%s) - -wait_seconds=5 - -echo "test: get-tree-head-to-sign" -curl $url/get-tree-head-to-sign -sleep $wait_seconds; echo "" - -echo "test: submitting four..." -$GOPATH/bin/submit --sk=$submit_sk --shard_hint=$shard_hint --domain_hint=$domain_hint | bash -$GOPATH/bin/submit --sk=$submit_sk --shard_hint=$shard_hint --domain_hint=$domain_hint | bash -$GOPATH/bin/submit --sk=$submit_sk --shard_hint=$shard_hint --domain_hint=$domain_hint | bash -$GOPATH/bin/submit --sk=$submit_sk --shard_hint=$shard_hint --domain_hint=$domain_hint | bash -sleep $wait_seconds - -echo "test: cosigning..." -$GOPATH/bin/cosign --url=$url --log_vk=$log_vk --sk=$wit_sk -sleep $wait_seconds -echo "" - -echo "test: get-tree-head-cosigned -- expect Error=no cosignatures available" -curl $url/get-tree-head-cosigned -sleep $wait_seconds -echo "" - -echo "test: get-checkpoint" -curl $url/get-checkpoint -sleep $wait_seconds -echo "" - -echo "test: get-consistency-proof (expect failure on first run with new log)" -printf "old_size=1\nnew_size=4\n" | curl --data-binary @- $url/get-consistency-proof -sleep $wait_seconds -echo "" - -echo "test: get-leaves (first and second)" -printf "start_size=0\nend_size=1\n" | curl --data-binary @- $url/get-leaves -sleep $wait_seconds -echo "" - -echo "with 30s interval we should now have a cosigned tree head" -curl $url/get-tree-head-cosigned -echo "" -- cgit v1.2.3