annotate Plugins/DicomWeb/Jobs/TestStowClientCancel.sh @ 606:0700fe8e2b78

skip test
author Alain Mazy <am@osimis.io>
date Tue, 23 Jan 2024 12:22:07 +0100
parents 1ea269d46d82
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
245
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 set -ex
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 CURL="curl -s -u alice:orthanctest"
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 # CARDIAC
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 job=`${CURL} http://localhost:8042/dicom-web/servers/sample/stow -d '{"Resources":["6e2c0ec2-5d99c8ca-c1c21cee-79a09605-68391d12"],"Synchronous":false,"Debug":true}' | jq -r .ID`
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 sleep 1
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 ${CURL} http://localhost:8042/jobs/${job} | jq .
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 ${CURL} http://localhost:8042/jobs/${job}/cancel -d '{}'
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 sleep 1
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 ${CURL} http://localhost:8042/jobs/${job} | jq .
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 sleep 2
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 ${CURL} http://localhost:8042/jobs/${job}/resubmit -d '{}'
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 sleep 1
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 set +x
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 while true
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 do
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 info=`${CURL} http://localhost:8042/jobs/${job}`
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 state=`echo $info | jq -r .State`
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 echo $info | jq .
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 echo $state
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 if [ $state != "Running" ]; then
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 break
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 else
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 sleep 1
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 fi
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 done
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37