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