Mercurial > hg > orthanc-tests
changeset 245:1ea269d46d82
test dicomweb jobs
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 21 Jun 2019 17:19:03 +0200 |
parents | 49cf8ed97a28 |
children | e4e0e2ff91ae |
files | Plugins/DicomWeb/Jobs/TestStowClientCancel.sh Plugins/DicomWeb/Jobs/TestStowClientPause.sh Plugins/DicomWeb/Jobs/TestStowClientSynchronous.sh Plugins/DicomWeb/Jobs/TestWadoClientCancel.sh Plugins/DicomWeb/Jobs/TestWadoClientPause.sh Plugins/DicomWeb/Jobs/TestWadoClientSynchronous.sh |
diffstat | 6 files changed, 155 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/DicomWeb/Jobs/TestStowClientCancel.sh Fri Jun 21 17:19:03 2019 +0200 @@ -0,0 +1,37 @@ +set -ex + +CURL="curl -s -u alice:orthanctest" + +# CARDIAC +job=`${CURL} http://localhost:8042/dicom-web/servers/sample/stow -d '{"Resources":["6e2c0ec2-5d99c8ca-c1c21cee-79a09605-68391d12"],"Synchronous":false,"Debug":true}' | jq -r .ID` + +sleep 1 + +${CURL} http://localhost:8042/jobs/${job} | jq . +${CURL} http://localhost:8042/jobs/${job}/cancel -d '{}' + +sleep 1 + +${CURL} http://localhost:8042/jobs/${job} | jq . + +sleep 2 + +${CURL} http://localhost:8042/jobs/${job}/resubmit -d '{}' +sleep 1 + +set +x + +while true +do + info=`${CURL} http://localhost:8042/jobs/${job}` + state=`echo $info | jq -r .State` + + echo $info | jq . + echo $state + if [ $state != "Running" ]; then + break + else + sleep 1 + fi +done +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/DicomWeb/Jobs/TestStowClientPause.sh Fri Jun 21 17:19:03 2019 +0200 @@ -0,0 +1,37 @@ +set -ex + +CURL="curl -s -u alice:orthanctest" + +# CARDIAC +job=`${CURL} http://localhost:8042/dicom-web/servers/sample/stow -d '{"Resources":["6e2c0ec2-5d99c8ca-c1c21cee-79a09605-68391d12"],"Synchronous":false,"Debug":true}' | jq -r .ID` + +sleep 1 + +${CURL} http://localhost:8042/jobs/${job} | jq . +${CURL} http://localhost:8042/jobs/${job}/pause -d '{}' + +sleep 1 + +${CURL} http://localhost:8042/jobs/${job} | jq . + +sleep 2 + +${CURL} http://localhost:8042/jobs/${job}/resume -d '{}' + + +set +x + +while true +do + info=`${CURL} http://localhost:8042/jobs/${job}` + state=`echo $info | jq -r .State` + + echo $info | jq . + echo $state + if [ $state != "Running" ]; then + break + else + sleep 1 + fi +done +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/DicomWeb/Jobs/TestStowClientSynchronous.sh Fri Jun 21 17:19:03 2019 +0200 @@ -0,0 +1,4 @@ +set -ex + +# CARDIAC +curl -s -u alice:orthanctest http://localhost:8042/dicom-web/servers/sample/stow -d '{"Resources":["6e2c0ec2-5d99c8ca-c1c21cee-79a09605-68391d12"],"Synchronous":true,"Debug":true}'
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/DicomWeb/Jobs/TestWadoClientCancel.sh Fri Jun 21 17:19:03 2019 +0200 @@ -0,0 +1,36 @@ +set -ex + +CURL="curl -s -u alice:orthanctest" + +# CARDIAC +job=`${CURL} http://localhost:8042/dicom-web/servers/sample/wado -d '{"Uri":"/studies/1.3.51.0.1.1.192.168.29.133.1681753.1681732","Debug":true}' | jq -r .ID` + +sleep 1 + +${CURL} http://localhost:8042/jobs/${job} | jq . +${CURL} http://localhost:8042/jobs/${job}/cancel -d '{}' + +sleep 1 + +${CURL} http://localhost:8042/jobs/${job} | jq . + +sleep 2 + +${CURL} http://localhost:8042/jobs/${job}/resubmit -d '{}' + + +set +x + +while true +do + info=`${CURL} http://localhost:8042/jobs/${job}` + state=`echo $info | jq -r .State` + + echo $info | jq . + echo $state + if [ $state != "Running" ]; then + break + else + sleep 1 + fi +done
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/DicomWeb/Jobs/TestWadoClientPause.sh Fri Jun 21 17:19:03 2019 +0200 @@ -0,0 +1,37 @@ +set -ex + +CURL="curl -s -u alice:orthanctest" + +# CARDIAC +job=`${CURL} http://localhost:8042/dicom-web/servers/sample/wado -d '{"Uri":"/studies/1.3.51.0.1.1.192.168.29.133.1681753.1681732","Debug":true}' | jq -r .ID` + +sleep 1 + +${CURL} http://localhost:8042/jobs/${job} | jq . +${CURL} http://localhost:8042/jobs/${job}/pause -d '{}' + +sleep 1 + +${CURL} http://localhost:8042/jobs/${job} | jq . + +sleep 2 + +${CURL} http://localhost:8042/jobs/${job}/resume -d '{}' + + +set +x + +while true +do + info=`${CURL} http://localhost:8042/jobs/${job}` + state=`echo $info | jq -r .State` + + echo $info | jq . + echo $state + if [ $state != "Running" ]; then + break + else + sleep 1 + fi +done +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/DicomWeb/Jobs/TestWadoClientSynchronous.sh Fri Jun 21 17:19:03 2019 +0200 @@ -0,0 +1,4 @@ +set -ex + +# CARDIAC +curl -s -u alice:orthanctest http://localhost:8042/dicom-web/servers/sample/wado -d '{"Uri":"/studies/1.3.51.0.1.1.192.168.29.133.1681753.1681732","Synchronous":true,"Debug":true}'