diff options
author | Rasmus Dahlberg <rasmus.dahlberg@kau.se> | 2022-04-26 20:18:19 +0200 |
---|---|---|
committer | Rasmus Dahlberg <rasmus.dahlberg@kau.se> | 2022-04-26 20:24:49 +0200 |
commit | 752bf9d8e1f78b54aaefdfb90f9f1f0391cd4b6d (patch) | |
tree | cfbcad5be0c0b5c436d79ffd57fb533678b7a878 /integration | |
parent | c2d43fdc19f23837ab071174e70a58d63e7d506d (diff) |
use http get for get-* endpoints with input
https://git.sigsum.org/sigsum/tree/doc/proposals/2022-01-get-endpoints
XXX: fix go.mod after merge in sigsum-go, now rgdd's local path
Diffstat (limited to 'integration')
-rwxr-xr-x | integration/test.sh | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/integration/test.sh b/integration/test.sh index e22857f..ec0d39e 100755 --- a/integration/test.sh +++ b/integration/test.sh @@ -285,12 +285,8 @@ function test_cosigned_tree_head() { function test_inclusion_proof() { desc="POST get-inclusion-proof (tree_size $1, data \"$2\", index $3)" signature=$(echo $2 | sigsum-debug leaf sign -k $cli_priv -h $ssrv_shard_start) - echo "tree_size=$1" > $log_dir/req - echo "leaf_hash=$(echo $2 | - sigsum-debug leaf hash -k $cli_key_hash -s $signature -h $ssrv_shard_start)" >> $log_dir/req - cat $log_dir/req | - curl -s -w "%{http_code}" --data-binary @- $log_url/get-inclusion-proof \ - >$log_dir/rsp + leaf_hash=$(echo $2 | sigsum-debug leaf hash -k $cli_key_hash -s $signature -h $ssrv_shard_start) + curl -s -w "%{http_code}" $log_url/get-inclusion-proof/$1/$leaf_hash >$log_dir/rsp if [[ $(status_code) != 200 ]]; then fail "$desc: http status code $(status_code)" @@ -313,9 +309,7 @@ function test_inclusion_proof() { function test_consistency_proof() { desc="POST get-consistency-proof (old_size $1, new_size $2)" - printf "old_size=$1\nnew_size=$2\n" | - curl -s -w "%{http_code}" --data-binary @- $log_url/get-consistency-proof \ - >$log_dir/rsp + curl -s -w "%{http_code}" $log_url/get-consistency-proof/$1/$2 >$log_dir/rsp if [[ $(status_code) != 200 ]]; then fail "$desc: http status code $(status_code)" @@ -333,9 +327,7 @@ function test_consistency_proof() { function test_get_leaf() { desc="GET get-leaves (data \"$1\", index $2)" - printf "start_size=$2\nend_size=$2\n" | - curl -s -w "%{http_code}" --data-binary @- $log_url/get-leaves \ - >$log_dir/rsp + curl -s -w "%{http_code}" $log_url/get-leaves/$2/$2 >$log_dir/rsp if [[ $(status_code) != 200 ]]; then fail "$desc: http status code $(status_code)" |