Skip to content

Commit aba9f19

Browse files
test(coserv): more parameterised test harness
Signed-off-by: Thomas Fossati <[email protected]>
1 parent a3fe7b3 commit aba9f19

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

coserv/test-harness/query.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ set -o pipefail
44
set -eu
55

66
A=${A?must be set in the environment to one of rv or ta}
7+
HOST=${HOST:-localhost}
8+
FMT=${FMT:-cbor}
79

810
base64url_encode() {
911
if [ "$(uname)" == "Darwin" ]
@@ -64,7 +66,7 @@ elif [ "${A}" == "ta" ]; then
6466
q=$(ta_query)
6567
fi
6668

67-
curl https://localhost:11443/endorsement-distribution/v1/coserv/$q -s \
69+
curl https://${HOST}:11443/endorsement-distribution/v1/coserv/$q -s \
6870
--insecure \
69-
--header 'Accept: application/coserv+cose; profile="tag:arm.com,2023:cca_platform#1.0.0"' \
71+
--header "Accept: application/coserv+${FMT}; profile=\"tag:arm.com,2023:cca_platform#1.0.0\"" \
7072
| cbor-edn cbor2diag

0 commit comments

Comments
 (0)