Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Commit

Permalink
For some reason this fixes the test
Browse files Browse the repository at this point in the history
  • Loading branch information
jbygdell committed Nov 30, 2022
1 parent f9f6f3c commit 8af2ece
Showing 1 changed file with 4 additions and 71 deletions.
75 changes: 4 additions & 71 deletions .github/integration/tests/s3notls/40_ingest_test_notls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,33 +46,8 @@ for file in dummy_data.c4gh largefile.c4gh; do

curl -vvv -u test:test 'http://localhost:15672/api/exchanges/test/sda/publish' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-binary "$(echo '{
"vhost":"test",
"name":"sda",
"properties":{
"delivery_mode":2,
"correlation_id":"CORRID",
"content_encoding":"UTF-8",
"content_type":"application/json"
},
"routing_key":"files",
"payload_encoding":"string",
"payload":"{
\"type\":\"ingest\",
\"user\":\"test\",
\"filepath\":\"FILENAME\",
\"encrypted_checksums\":[
{
\"type\":\"sha256\",
\"value\":\"SHA256SUM\"
},
{
\"type\":\"md5\",
\"value\":\"MD5SUM\"
}
]
}"
}' | sed -e "s/FILENAME/$file/" -e "s/MD5SUM/${md5sum}/" -e "s/SHA256SUM/${sha256sum}/" -e "s/CORRID/$count/")"
--data-binary "$(echo '{"vhost":"test","name":"sda","properties":{"delivery_mode":2,"correlation_id":"CORRID","content_encoding":"UTF-8","content_type":"application/json"},"routing_key":"files","payload_encoding":"string","payload":"{\"type\":\"ingest\",\"user\":\"test\",\"filepath\":\"FILENAME\",\"encrypted_checksums\":[{\"type\":\"sha256\",\"value\":\"SHA256SUM\"},{\"type\":\"md5\",\"value\":\"MD5SUM\"}]}"}' | sed -e "s/FILENAME/$file/" -e "s/MD5SUM/${md5sum}/" -e "s/SHA256SUM/${sha256sum}/" -e "s/CORRID/$count/")"


RETRY_TIMES=0
until docker logs ingest --since="$now" 2>&1 | grep "File marked as archived"; do
Expand Down Expand Up @@ -145,34 +120,7 @@ for file in dummy_data.c4gh largefile.c4gh; do
# Publish accession id
curl -vvv -u test:test 'http://localhost:15672/api/exchanges/test/sda/publish' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-binary "$(echo '{
"vhost":"test",
"name":"sda",
"properties":{
"delivery_mode":2,
"correlation_id":"CORRID",
"content_encoding":"UTF-8",
"content_type":"application/json"
},
"routing_key":"files",
"payload_encoding":"string",
"payload":"{
\"type\":\"accession\",
\"user\":\"test\",
\"filepath\":\"FILENAME\",
\"accession_id\":\"ACCESSIONID\",
\"decrypted_checksums\":[
{
\"type\":\"sha256\",
\"value\":\"DECSHA256SUM\"
},
{
\"type\":\"md5\",
\"value\":\"DECMD5SUM\"
}
]
}"
}' | sed -e "s/FILENAME/$filepath/" -e "s/DECMD5SUM/${decmd5sum}/" -e "s/DECSHA256SUM/${decsha256sum}/" -e "s/ACCESSIONID/${access}/" -e "s/CORRID/$count/")"
--data-binary "$(echo '{"vhost":"test","name":"sda","properties":{"delivery_mode":2,"correlation_id":"CORRID","content_encoding":"UTF-8","content_type":"application/json"},"routing_key":"files","payload_encoding":"string","payload":"{\"type\":\"accession\",\"user\":\"test\",\"filepath\":\"FILENAME\",\"accession_id\":\"ACCESSIONID\",\"decrypted_checksums\":[{\"type\":\"sha256\",\"value\":\"DECSHA256SUM\"},{\"type\":\"md5\",\"value\":\"DECMD5SUM\"}]}"}' | sed -e "s/FILENAME/$filepath/" -e "s/DECMD5SUM/${decmd5sum}/" -e "s/DECSHA256SUM/${decsha256sum}/" -e "s/ACCESSIONID/${access}/" -e "s/CORRID/$count/")"

echo "Waiting for finalize/backup to complete"

Expand Down Expand Up @@ -249,22 +197,7 @@ for file in dummy_data.c4gh largefile.c4gh; do
# Map dataset ids
curl -vvv -u test:test 'http://localhost:15672/api/exchanges/test/sda/publish' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-binary "$(echo '{
"vhost":"test",
"name":"sda",
"properties":{
"delivery_mode":2,
"correlation_id":"CORRID",
"content_encoding":"UTF-8",
"content_type":"application/json"
},
"routing_key":"files",
"payload_encoding":"string",
"payload":"{
\"type\":\"mapping\",
\"dataset_id\":\"DATASET\",
\"accession_ids\":[\"ACCESSIONID\"]}"
}' | sed -e "s/DATASET/$dataset/" -e "s/ACCESSIONID/$access/" -e "s/CORRID/$count/")"
--data-binary "$(echo '{"vhost":"test","name":"sda","properties":{"delivery_mode":2,"correlation_id":"CORRID","content_encoding":"UTF-8","content_type":"application/json"},"routing_key":"files","payload_encoding":"string","payload":"{\"type\":\"mapping\",\"dataset_id\":\"DATASET\",\"accession_ids\":[\"ACCESSIONID\"]}"}' | sed -e "s/DATASET/$dataset/" -e "s/ACCESSIONID/$access/" -e "s/CORRID/$count/")"

RETRY_TIMES=0
dbcheck=''
Expand Down

0 comments on commit 8af2ece

Please sign in to comment.