diff options
author | Rasmus Dahlberg <rasmus.dahlberg@kau.se> | 2020-10-27 10:53:46 +0100 |
---|---|---|
committer | Rasmus Dahlberg <rasmus.dahlberg@kau.se> | 2020-10-27 10:53:46 +0100 |
commit | 96a5021d586a20cbf00eb7f74ca08084bbaf048a (patch) | |
tree | c1e18bc03852c47e04de81ac34241ed58cd3adca /server/testdata/cmd/add-entry | |
parent | 550f7878bf509cc825726e6d95506e62857d48c9 (diff) |
added additional interactive test scripts
Diffstat (limited to 'server/testdata/cmd/add-entry')
-rwxr-xr-x | server/testdata/cmd/add-entry | 13 |
1 files changed, 6 insertions, 7 deletions
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 |