Skip to content

Commit

Permalink
[tests] allow 409 from add-api-key request
Browse files Browse the repository at this point in the history
  • Loading branch information
MalinAhlberg committed Oct 18, 2024
1 parent 6e8bacf commit a5f52b3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/integration/tests/sda/20_ingest-verify_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,12 @@ for file in NA12878.bam NA12878_20k_b37.bam NA12878.bai NA12878_20k_b37.bai; do

# Insert key hash after the ingestion of the first file has started
# Makes sure that ingestion works even if the key hash is there
curl -k -L "http://api:8080/key/hashed" -H "Authorization: Bearer $token" -d "{\"hash\": \"$key\", \"description\": \"first key\"}"
response=$(curl -s -w "%{http_code}" -k -L "http://api:8080/key/hashed" -H "Authorization: Bearer $token" -d "{\"hash\": \"$key\", \"description\": \"first key\"}")
status="${response: -3}"
if [ $status -ne "200" ] && [ $status -ne "409" ]; then
echo "Could not add key hash to database"
exit 1
fi
done

echo "waiting for verify to complete"
Expand Down

0 comments on commit a5f52b3

Please sign in to comment.