Mercurial > hg > orthanc-tests
annotate GenerateConfigurationForTests.py @ 603:75244cf58a6d
new test for KeepLabels
author | Alain Mazy <am@osimis.io> |
---|---|
date | Mon, 22 Jan 2024 17:12:08 +0100 |
parents | b6c1f0c9ca15 |
children | 9f8276ac1cdd |
rev | line source |
---|---|
595
b6c1f0c9ca15
fix test_error_codes_content_type
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
585
diff
changeset
|
1 #!/usr/bin/env python3 |
3 | 2 |
3 # Orthanc - A Lightweight, RESTful DICOM Store | |
73 | 4 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
3 | 5 # Department, University Hospital of Liege, Belgium |
511
933fe1bbce4f
upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
6 # Copyright (C) 2017-2023 Osimis S.A., Belgium |
933fe1bbce4f
upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
480
diff
changeset
|
7 # Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
3 | 8 # |
9 # This program is free software: you can redistribute it and/or | |
10 # modify it under the terms of the GNU General Public License as | |
11 # published by the Free Software Foundation, either version 3 of the | |
12 # License, or (at your option) any later version. | |
13 # | |
14 # This program is distributed in the hope that it will be useful, but | |
15 # WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
17 # General Public License for more details. | |
18 # | |
19 # You should have received a copy of the GNU General Public License | |
20 # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
21 | |
22 | |
23 import argparse | |
24 import os | |
25 import re | |
26 import socket | |
27 import subprocess | |
28 import sys | |
87
4b24faec842b
test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
82
diff
changeset
|
29 import json |
520
a06d0a45c62f
Python 3 compatibility of GenerateConfigurationForTests.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
515
diff
changeset
|
30 import sys |
a06d0a45c62f
Python 3 compatibility of GenerateConfigurationForTests.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
515
diff
changeset
|
31 |
a06d0a45c62f
Python 3 compatibility of GenerateConfigurationForTests.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
515
diff
changeset
|
32 if sys.version_info[0] < 3: |
a06d0a45c62f
Python 3 compatibility of GenerateConfigurationForTests.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
515
diff
changeset
|
33 from urllib2 import urlopen |
a06d0a45c62f
Python 3 compatibility of GenerateConfigurationForTests.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
515
diff
changeset
|
34 else: |
a06d0a45c62f
Python 3 compatibility of GenerateConfigurationForTests.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
515
diff
changeset
|
35 from urllib.request import urlopen |
101
71bca28a4645
remove the dependency upon installing Orthanc to generate the default configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
100
diff
changeset
|
36 |
3 | 37 |
38 ## | |
39 ## Parse the command-line arguments | |
40 ## | |
41 | |
42 parser = argparse.ArgumentParser(description = 'Generate the configuration file for the ' + | |
43 'instance of Orthanc to be checked against the integration tests.') | |
44 | |
45 parser.add_argument('--target', | |
46 default = 'IntegrationTestsConfiguration.json', | |
47 help = 'Configuration file to generate') | |
48 | |
49 parser.add_argument('--force', | |
50 help = 'Overwrite the file even if it already exists', | |
51 action = 'store_true') | |
52 | |
380
b9adc7d06347
update tests following removal of dicom-as-json attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
363
diff
changeset
|
53 parser.add_argument('--compression', |
b9adc7d06347
update tests following removal of dicom-as-json attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
363
diff
changeset
|
54 help = 'Enable storage compression', |
b9adc7d06347
update tests following removal of dicom-as-json attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
363
diff
changeset
|
55 action = 'store_true') |
b9adc7d06347
update tests following removal of dicom-as-json attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
363
diff
changeset
|
56 |
31 | 57 parser.add_argument('--plugins', |
58 help = 'Add a path to a folder containing plugins') | |
59 | |
82 | 60 parser.add_argument('--dicom', |
61 type = int, | |
62 default = 4242, | |
63 help = 'DICOM port of the Orthanc server') | |
64 | |
3 | 65 args = parser.parse_args() |
66 | |
67 | |
68 ## | |
69 ## Check whether the file can be overwritten | |
70 ## | |
71 | |
72 if os.path.exists(args.target) and not args.force: | |
73 print(""" | |
74 WARNING: The file %s will be overwritten! | |
75 | |
76 Are you sure ["yes" to go on]?""" % args.target) | |
77 | |
78 if sys.stdin.readline().strip() != 'yes': | |
79 print('Aborting...') | |
80 exit(0) | |
81 | |
82 | |
83 ## | |
84 ## Generate the configuration file | |
85 ## | |
86 | |
87 | |
88 # Retrieve the IP address of the localhost | |
89 ip = socket.gethostbyname(socket.gethostname()) | |
90 | |
101
71bca28a4645
remove the dependency upon installing Orthanc to generate the default configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
100
diff
changeset
|
91 |
71bca28a4645
remove the dependency upon installing Orthanc to generate the default configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
100
diff
changeset
|
92 # Download the content of the default configuration file |
520
a06d0a45c62f
Python 3 compatibility of GenerateConfigurationForTests.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
515
diff
changeset
|
93 with open(args.target, 'wb') as f: |
585 | 94 url = 'https://orthanc.uclouvain.be/hg/orthanc/raw-file/default/OrthancServer/Resources/Configuration.json' |
520
a06d0a45c62f
Python 3 compatibility of GenerateConfigurationForTests.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
515
diff
changeset
|
95 http = urlopen(url) |
101
71bca28a4645
remove the dependency upon installing Orthanc to generate the default configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
100
diff
changeset
|
96 if http.getcode() != 200: |
71bca28a4645
remove the dependency upon installing Orthanc to generate the default configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
100
diff
changeset
|
97 raise Exception('Cannot download: %s' % url) |
71bca28a4645
remove the dependency upon installing Orthanc to generate the default configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
100
diff
changeset
|
98 |
71bca28a4645
remove the dependency upon installing Orthanc to generate the default configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
100
diff
changeset
|
99 f.write(http.read()) |
71bca28a4645
remove the dependency upon installing Orthanc to generate the default configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
100
diff
changeset
|
100 |
3 | 101 |
102 with open(args.target, 'r') as f: | |
87
4b24faec842b
test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
82
diff
changeset
|
103 # Remove the C++-style comments |
4b24faec842b
test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
82
diff
changeset
|
104 nocomment = re.sub('//.*$', '', f.read(), 0, re.MULTILINE) |
4b24faec842b
test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
82
diff
changeset
|
105 |
4b24faec842b
test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
82
diff
changeset
|
106 # Remove the C-style comments |
4b24faec842b
test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
82
diff
changeset
|
107 nocomment = re.sub('/\*.*?\*/', '', nocomment, 0, re.DOTALL | re.MULTILINE) |
4b24faec842b
test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
82
diff
changeset
|
108 |
4b24faec842b
test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
82
diff
changeset
|
109 config = json.loads(nocomment) |
3 | 110 |
224
f5414254ccaa
test_bitbucket_issue_113
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
212
diff
changeset
|
111 config['DefaultEncoding'] = 'Utf8' |
95
a807a4699eb4
testing of metadata SopClassUid
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
92
diff
changeset
|
112 config['AllowFindSopClassesInStudy'] = False |
87
4b24faec842b
test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
82
diff
changeset
|
113 config['AuthenticationEnabled'] = True |
4b24faec842b
test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
82
diff
changeset
|
114 config['DicomAet'] = 'ORTHANC' |
4b24faec842b
test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
82
diff
changeset
|
115 config['DicomAssociationCloseDelay'] = 0 |
188
7d585263808b
new test: test_queries_hierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
187
diff
changeset
|
116 config['DicomModalities'] = { |
7d585263808b
new test: test_queries_hierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
187
diff
changeset
|
117 'orthanctest' : [ 'ORTHANCTEST', ip, 5001 ], |
7d585263808b
new test: test_queries_hierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
187
diff
changeset
|
118 'self' : [ 'ORTHANC', '127.0.0.1', 4242 ] |
7d585263808b
new test: test_queries_hierarchy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
187
diff
changeset
|
119 } |
87
4b24faec842b
test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
82
diff
changeset
|
120 config['DicomPort'] = args.dicom |
4b24faec842b
test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
82
diff
changeset
|
121 config['HttpCompressionEnabled'] = False |
139 | 122 config['LogExportedResources'] = True |
232
f2af7bdc9bf8
tests for transfers accelerator
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
123 config['OrthancPeers'] = { |
f2af7bdc9bf8
tests for transfers accelerator
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
124 'peer' : [ 'http://%s:%d/' % (ip, 5000), 'alice', 'orthanctest' ], |
f2af7bdc9bf8
tests for transfers accelerator
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
125 'transfers-bidirectional' : { |
f2af7bdc9bf8
tests for transfers accelerator
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
126 'Url' : 'http://localhost:8042/', |
f2af7bdc9bf8
tests for transfers accelerator
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
127 'RemoteSelf' : 'transfers-bidirectional', |
f2af7bdc9bf8
tests for transfers accelerator
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
128 'Username' : 'alice', |
f2af7bdc9bf8
tests for transfers accelerator
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
129 'Password' : 'orthanctest' |
f2af7bdc9bf8
tests for transfers accelerator
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
130 }, |
f2af7bdc9bf8
tests for transfers accelerator
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
131 'transfers-simple' : { |
f2af7bdc9bf8
tests for transfers accelerator
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
132 'Url' : 'http://localhost:8042/', |
f2af7bdc9bf8
tests for transfers accelerator
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
133 'Username' : 'alice', |
f2af7bdc9bf8
tests for transfers accelerator
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
134 'Password' : 'orthanctest' |
328
8a462f9c5a97
test_store_compressed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
319
diff
changeset
|
135 }, |
8a462f9c5a97
test_store_compressed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
319
diff
changeset
|
136 'self' : { |
329 | 137 'Url' : 'http://127.0.0.1:8042/', |
328
8a462f9c5a97
test_store_compressed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
319
diff
changeset
|
138 'Username' : 'alice', |
8a462f9c5a97
test_store_compressed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
319
diff
changeset
|
139 'Password' : 'orthanctest' |
232
f2af7bdc9bf8
tests for transfers accelerator
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
140 } |
f2af7bdc9bf8
tests for transfers accelerator
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
141 } |
87
4b24faec842b
test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
82
diff
changeset
|
142 config['RegisteredUsers'] = { 'alice' : 'orthanctest' } |
4b24faec842b
test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
82
diff
changeset
|
143 config['RemoteAccessAllowed'] = True |
173 | 144 config['OverwriteInstances'] = True |
515
5dca7ef42156
added a non-regression test wrt StableStudy
Alain Mazy <am@osimis.io>
parents:
512
diff
changeset
|
145 config['StableAge'] = 1 |
180
fcb0c14dadb8
increasing JobsHistorySize
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
173
diff
changeset
|
146 config['JobsHistorySize'] = 1000 |
185
d4a5e4143d68
fixing value of SynchronousCMove
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
180
diff
changeset
|
147 config['SynchronousCMove'] = False |
187 | 148 config['MediaArchiveSize'] = 1 |
212 | 149 config['SaveJobs'] = False |
257 | 150 config['ExecuteLuaEnabled'] = True |
263
a2719263fd04
test_study_series_find_inconsistency
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
260
diff
changeset
|
151 config['HttpTimeout'] = 2 |
335
96718de2f29c
simplification and fix of test_incoming_findscu
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
329
diff
changeset
|
152 config['SyncStorageArea'] = False # For tests to run more quickly |
337
ec13ace43bde
trying webdav tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
335
diff
changeset
|
153 config['WebDavEnabled'] = True |
ec13ace43bde
trying webdav tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
335
diff
changeset
|
154 config['WebDavDeleteAllowed'] = True |
ec13ace43bde
trying webdav tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
335
diff
changeset
|
155 config['WebDavUploadAllowed'] = True |
380
b9adc7d06347
update tests following removal of dicom-as-json attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
363
diff
changeset
|
156 config['StorageCompression'] = args.compression |
391
227d9a932467
testing revisions in metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
380
diff
changeset
|
157 config['CheckRevisions'] = True |
480
5ac463ebf463
added a test for lua SetHttpTimeout
Alain Mazy <am@osimis.io>
parents:
449
diff
changeset
|
158 config['HttpsCACertificates'] = "/etc/ssl/certs/ca-certificates.crt" # for HTTPS lua tests (note: this path is valid only on linux !) |
337
ec13ace43bde
trying webdav tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
335
diff
changeset
|
159 |
409
19154b57d0ae
backward compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
395
diff
changeset
|
160 del config['DeidentifyLogsDicomVersion'] |
205 | 161 del config['KeepAlive'] |
88
47a3d6c08413
easier dicomweb setup
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
87
diff
changeset
|
162 |
87
4b24faec842b
test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
82
diff
changeset
|
163 config['Dictionary'] = { |
90
afbac3eb28a5
integration tests of worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
88
diff
changeset
|
164 '00e1,10c2' : [ 'UI', 'PET-CT Multi Modality Name', 1, 1, 'ELSCINT1' ], |
235
9929e4af2b7a
test_bitbucket_issue_140
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
232
diff
changeset
|
165 '7053,1003' : [ 'ST', 'Original Image Filename', 1, 1, 'Philips PET Private Group' ], |
270
082f35cb4459
test_bitbuck_issue_168
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
263
diff
changeset
|
166 '4321,1012' : [ 'LO', 'RadioButton3', 1, 1, 'RadioLogic' ], # For issue 140 |
082f35cb4459
test_bitbuck_issue_168
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
263
diff
changeset
|
167 '0009,1001' : [ 'DS', 'Abnormality score', 1, 1, 'Lunit' ], # For issue 168 |
082f35cb4459
test_bitbuck_issue_168
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
263
diff
changeset
|
168 '0009,0010' : [ 'LO', 'Private data element', 1, 1, 'Lunit' ], # For issue 168 |
87
4b24faec842b
test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
82
diff
changeset
|
169 } |
3 | 170 |
512 | 171 config['UserMetadata'] = { |
172 'my-metadata': 1098 | |
173 } | |
174 | |
270
082f35cb4459
test_bitbuck_issue_168
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
263
diff
changeset
|
175 config['DefaultPrivateCreator'] = 'Lunit' # For issue 168 |
082f35cb4459
test_bitbuck_issue_168
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
263
diff
changeset
|
176 |
88
47a3d6c08413
easier dicomweb setup
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
87
diff
changeset
|
177 config['DicomWeb'] = { |
90
afbac3eb28a5
integration tests of worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
88
diff
changeset
|
178 'Servers' : { |
afbac3eb28a5
integration tests of worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
88
diff
changeset
|
179 'sample' : [ |
afbac3eb28a5
integration tests of worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
88
diff
changeset
|
180 'http://localhost:8042/dicom-web/', |
afbac3eb28a5
integration tests of worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
88
diff
changeset
|
181 'alice', |
afbac3eb28a5
integration tests of worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
88
diff
changeset
|
182 'orthanctest' |
88
47a3d6c08413
easier dicomweb setup
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
87
diff
changeset
|
183 ] |
47a3d6c08413
easier dicomweb setup
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
87
diff
changeset
|
184 } |
47a3d6c08413
easier dicomweb setup
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
87
diff
changeset
|
185 } |
47a3d6c08413
easier dicomweb setup
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
87
diff
changeset
|
186 |
90
afbac3eb28a5
integration tests of worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
88
diff
changeset
|
187 config['Worklists'] = { |
afbac3eb28a5
integration tests of worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
88
diff
changeset
|
188 'Enable': True, |
afbac3eb28a5
integration tests of worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
88
diff
changeset
|
189 'Database': os.path.abspath(os.path.join(os.path.dirname(__file__), './Database/Worklists/Working')), |
afbac3eb28a5
integration tests of worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
88
diff
changeset
|
190 } |
afbac3eb28a5
integration tests of worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
88
diff
changeset
|
191 |
99
37430f7430e3
config to test the PostgreSQL plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
95
diff
changeset
|
192 config['PostgreSQL'] = { |
37430f7430e3
config to test the PostgreSQL plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
95
diff
changeset
|
193 'EnableIndex' : True, |
37430f7430e3
config to test the PostgreSQL plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
95
diff
changeset
|
194 'EnableStorage' : True, |
37430f7430e3
config to test the PostgreSQL plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
95
diff
changeset
|
195 'Host' : 'localhost', |
37430f7430e3
config to test the PostgreSQL plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
95
diff
changeset
|
196 'Port' : 5432, |
37430f7430e3
config to test the PostgreSQL plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
95
diff
changeset
|
197 'Database' : 'orthanctest', |
37430f7430e3
config to test the PostgreSQL plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
95
diff
changeset
|
198 'Username' : 'postgres', |
395
3c15eadd941a
added explicit db parameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
391
diff
changeset
|
199 'Password' : 'postgres', |
3c15eadd941a
added explicit db parameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
391
diff
changeset
|
200 'Lock' : False, |
3c15eadd941a
added explicit db parameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
391
diff
changeset
|
201 'IndexConnectionsCount' : 5, |
3c15eadd941a
added explicit db parameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
391
diff
changeset
|
202 'MaximumConnectionRetries' : 7, |
99
37430f7430e3
config to test the PostgreSQL plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
95
diff
changeset
|
203 } |
37430f7430e3
config to test the PostgreSQL plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
95
diff
changeset
|
204 |
140 | 205 config['MySQL'] = { |
206 'EnableIndex' : True, | |
207 'EnableStorage' : True, | |
208 'Host' : 'localhost', | |
209 'Port' : 3306, | |
210 'Database' : 'orthanctest', | |
211 'Username' : 'root', | |
212 'Password' : 'root', | |
153 | 213 'UnixSocket' : '', |
395
3c15eadd941a
added explicit db parameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
391
diff
changeset
|
214 'Lock' : False, |
3c15eadd941a
added explicit db parameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
391
diff
changeset
|
215 'IndexConnectionsCount' : 5, |
3c15eadd941a
added explicit db parameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
391
diff
changeset
|
216 'MaximumConnectionRetries' : 7, |
140 | 217 } |
218 | |
430
9430b5728ca0
added ODBC in GenerateConfigurationForTests.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
409
diff
changeset
|
219 config['Odbc'] = { |
9430b5728ca0
added ODBC in GenerateConfigurationForTests.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
409
diff
changeset
|
220 'EnableIndex' : True, |
9430b5728ca0
added ODBC in GenerateConfigurationForTests.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
409
diff
changeset
|
221 'EnableStorage' : True, |
9430b5728ca0
added ODBC in GenerateConfigurationForTests.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
409
diff
changeset
|
222 'IndexConnectionString' : 'DSN=test', |
9430b5728ca0
added ODBC in GenerateConfigurationForTests.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
409
diff
changeset
|
223 'StorageConnectionString' : 'DSN=storage', |
9430b5728ca0
added ODBC in GenerateConfigurationForTests.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
409
diff
changeset
|
224 'IndexConnectionsCount' : 1, |
9430b5728ca0
added ODBC in GenerateConfigurationForTests.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
409
diff
changeset
|
225 'MaximumConnectionRetries' : 7, |
9430b5728ca0
added ODBC in GenerateConfigurationForTests.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
409
diff
changeset
|
226 } |
9430b5728ca0
added ODBC in GenerateConfigurationForTests.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
409
diff
changeset
|
227 |
568
6399d3a1cd30
WSI: fix compatibility with Python 3
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
520
diff
changeset
|
228 config['WholeSlideImaging'] = { |
6399d3a1cd30
WSI: fix compatibility with Python 3
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
520
diff
changeset
|
229 'ServeMirador' : True, |
6399d3a1cd30
WSI: fix compatibility with Python 3
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
520
diff
changeset
|
230 'ServeOpenSeadragon' : True, |
6399d3a1cd30
WSI: fix compatibility with Python 3
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
520
diff
changeset
|
231 } |
6399d3a1cd30
WSI: fix compatibility with Python 3
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
520
diff
changeset
|
232 |
90
afbac3eb28a5
integration tests of worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
88
diff
changeset
|
233 |
88
47a3d6c08413
easier dicomweb setup
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
87
diff
changeset
|
234 |
13 | 235 # Enable case-insensitive PN (the default on versions <= 0.8.6) |
87
4b24faec842b
test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
82
diff
changeset
|
236 config['CaseSensitivePN'] = False |
82 | 237 |
31 | 238 if args.plugins != None: |
87
4b24faec842b
test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
82
diff
changeset
|
239 config['Plugins'] = [ args.plugins ] |
31 | 240 |
3 | 241 with open(args.target, 'wt') as f: |
87
4b24faec842b
test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
82
diff
changeset
|
242 f.write(json.dumps(config, indent = True, sort_keys = True)) |
4b24faec842b
test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
82
diff
changeset
|
243 f.write('\n') |