From 96a5021d586a20cbf00eb7f74ca08084bbaf048a Mon Sep 17 00:00:00 2001 From: Rasmus Dahlberg Date: Tue, 27 Oct 2020 10:53:46 +0100 Subject: added additional interactive test scripts --- server/testdata/cmd/add-entry | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'server/testdata/cmd/add-entry') diff --git a/server/testdata/cmd/add-entry b/server/testdata/cmd/add-entry index d7346bb..9efd3bf 100755 --- a/server/testdata/cmd/add-entry +++ b/server/testdata/cmd/add-entry @@ -1,20 +1,20 @@ #!/bin/bash set -eo pipefail +source config algo=ecdsa key_path="../chain/rgdd-$algo.key" cert_path="../chain/rgdd-$algo.pem" -name="foobar-0.0.1" +name="foobar-1.2.3" if [[ ! -z $1 ]]; then name=$1 fi -echo "[Info] package name: $name" >&2 +info "package name: $name" - -echo "[Info] generating StItem and signature..." >&2 pushd ../entry >/dev/null + info "generating base64-encoded StItem and signature" go run . --dir stitem --name $name openssl dgst -sha256 -sign $key_path -out stitem/$name.sig stitem/$name openssl base64 -A -in stitem/$name -out stitem/$name.b64 @@ -29,6 +29,5 @@ pushd ../entry >/dev/null rm -f stitem/$name{,.sig,.b64,.sig.b64} popd >/dev/null -echo "[Info] doing add-entry request" -curl --header "application/json" --request POST --data $json\ - localhost:6965/st/v1/add-entry +info "sending add-entry request" +curl --header "application/json" --request POST --data $json $base_url/add-entry -- cgit v1.2.3