diff --git a/.github/integration/tests/sda/20_ingest-verify_test.sh b/.github/integration/tests/sda/20_ingest-verify_test.sh index cf85c8ac4..b42614d8a 100644 --- a/.github/integration/tests/sda/20_ingest-verify_test.sh +++ b/.github/integration/tests/sda/20_ingest-verify_test.sh @@ -17,9 +17,9 @@ cd shared || true token="$(curl http://oidc:8080/tokens | jq -r '.[0]')" # we need to insert the key hash into the db before ingesting files -# decode from base64, then hex encode the public key -key="$(head -n2 /shared/c4gh.pub.pem | tail -n1 | base64 -d | xxd -p | tr -d '\n')" -response=$(curl -s -w "%{http_code}" -k -L "http://api:8080/c4gh-keys/add" -H "Authorization: Bearer $token" -d "{\"hash\": \"$key\", \"description\": \"first key\"}") +key="$(base64 -w0 /shared/c4gh.pub.pem)" +response=$(curl -s -w "%{http_code}" -k -L "http://api:8080/c4gh-keys/add" -H "Authorization: Bearer $token" -d "{\"pubkey\": \"$key\", \"description\": \"first key\"}") +# fe92e95f37b522d06d68aa00ccd74b930f150dafd23d0f512fdbf43de4eb2c41 by ingest # Extract the 3 last characters, ie the status code status=$(printf "%s" "$response" | tail -c 3) if [ "$status" -ne "200" ] && [ "$status" -ne "409" ]; then