annotate Plugins/DicomWeb/Jobs/TestWadoClientPause.sh @ 631:3bf3ea08efde

typo
author Alain Mazy <am@osimis.io>
date Tue, 05 Mar 2024 09:13:02 +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/wado -d '{"Uri":"/studies/1.3.51.0.1.1.192.168.29.133.1681753.1681732","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}/pause -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}/resume -d '{}'
1ea269d46d82 test dicomweb jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
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