changeset 988:99e19529a7e0

fix
author Alain Mazy <am@orthanc.team>
date Mon, 28 Sep 2026 10:01:08 +0200
parents ea4b4ec7eef1
children 599b328e5a75
files NewTests/PostgresUpgrades/docker-compose.yml NewTests/PostgresUpgrades/orthanc-for-integ-tests.json Tests/Tests.py Tests/Toolbox.py
diffstat 4 files changed, 212 insertions(+), 193 deletions(-) [+]
line wrap: on
line diff
--- a/NewTests/PostgresUpgrades/docker-compose.yml	Fri Sep 25 16:24:42 2026 +0200
+++ b/NewTests/PostgresUpgrades/docker-compose.yml	Mon Sep 28 10:01:08 2026 +0200
@@ -56,6 +56,8 @@
       - ./wait-for-it.sh:/scripts/wait-for-it.sh
       - ./run-integ-tests-from-docker.sh:/scripts/run-integ-tests-from-docker.sh
     entrypoint: /scripts/run-integ-tests-from-docker.sh
+    environment:
+      PYTHONUNBUFFERED: "1"
 
   # Orthanc latest version
   orthanc-pg-15-under-tests:
--- a/NewTests/PostgresUpgrades/orthanc-for-integ-tests.json	Fri Sep 25 16:24:42 2026 +0200
+++ b/NewTests/PostgresUpgrades/orthanc-for-integ-tests.json	Mon Sep 28 10:01:08 2026 +0200
@@ -5,202 +5,220 @@
 // - remove the PostgreSQL/MySQL/Odbc sections
 // - update the IP of OrthancPeers and DicomModalities: replace localhost by orthanc-tests for the first item
 // - update the Worklists.Database to "/worklists"
-// - update the StorageDirectory to "/var/lib/orthand/db/"
 {
-    "AcceptedTransferSyntaxes": [
-      "1.2.840.10008.1.*"
-     ], 
-     "AllowFindSopClassesInStudy": false, 
-     "AuthenticationEnabled": true, 
-     "BuiltinDecoderTranscoderOrder": "After", 
-     "CaseSensitivePN": false, 
-     "CheckRevisions": true, 
-     "ConcurrentJobs": 2, 
-     "DefaultEncoding": "Utf8", 
-     "DefaultPrivateCreator": "Lunit", 
-     "DeidentifyLogs": true, 
-     "DicomAet": "ORTHANC", 
-     "DicomAlwaysAllowEcho": true, 
-     "DicomAlwaysAllowFind": false, 
-     "DicomAlwaysAllowFindWorklist": false, 
-     "DicomAlwaysAllowGet": false, 
-     "DicomAlwaysAllowMove": false, 
-     "DicomAlwaysAllowStore": true, 
-     "DicomAssociationCloseDelay": 0, 
-     "DicomCheckCalledAet": false, 
-     "DicomCheckModalityHost": false, 
-     "DicomEchoChecksFind": false, 
-     "DicomLossyTranscodingQuality": 90, 
-     "DicomModalities": {
-      "orthanctest": [
-       "ORTHANCTEST", 
-       "orthanc-tests", 
-       5001
-      ], 
-      "self": [
-       "ORTHANC", 
-       "127.0.0.1", 
-       4242
-      ]
-     }, 
-     "DicomModalitiesInDatabase": false, 
-     "DicomPort": 4242, 
-     "DicomScpTimeout": 30, 
-     "DicomScuPreferredTransferSyntax": "1.2.840.10008.1.2.1", 
-     "DicomScuTimeout": 10, 
-     "DicomServerEnabled": true, 
-     "DicomThreadsCount": 4, 
-     "DicomTlsEnabled": false, 
-     "DicomTlsRemoteCertificateRequired": true, 
-     "DicomWeb": {
-      "Servers": {
-       "sample": [
-        "http://localhost:8042/dicom-web/", 
-        "alice", 
+  "AcceptedTransferSyntaxes": [
+    "1.2.840.10008.1.*"
+  ],
+  "AllowFindSopClassesInStudy": false,
+  "AuthenticationEnabled": true,
+  "BuiltinDecoderTranscoderOrder": "After",
+  "CaseSensitivePN": false,
+  "CheckRevisions": true,
+  "ConcurrentJobs": 2,
+  "DefaultEncoding": "Utf8",
+  "DefaultPrivateCreator": "Lunit",
+  "DeidentifyLogs": true,
+  "DicomAet": "ORTHANC",
+  "DicomAlwaysAllowEcho": true,
+  "DicomAlwaysAllowFind": false,
+  "DicomAlwaysAllowFindWorklist": false,
+  "DicomAlwaysAllowGet": false,
+  "DicomAlwaysAllowMove": false,
+  "DicomAlwaysAllowStore": true,
+  "DicomAssociationCloseDelay": 0,
+  "DicomCheckCalledAet": false,
+  "DicomCheckModalityHost": false,
+  "DicomEchoChecksFind": false,
+  "DicomLossyTranscodingQuality": 90,
+  "DicomModalities": {
+    "orthanctest": [
+      "ORTHANCTEST",
+      "orthanc-tests",
+      5001
+    ],
+    "orthanctest-with-local-aet": {
+      "AET": "ORTHANCTEST2",
+      "Host": "orthanc-tests",
+      "LocalAet": "OT-FROM-CONFIG",
+      "Port": 5001
+    },
+    "self": [
+      "ORTHANC",
+      "127.0.0.1",
+      4242
+    ],
+    "self-with-local-aet": {
+      "AET": "ORTHANC",
+      "Host": "127.0.0.1",
+      "LocalAet": "SELF-FROM-CONFIG",
+      "Port": 4242
+    },
+    "self-with-fake-local-aet": {
+      "AET": "FAKE_SELF_AET",
+      "Host": "127.0.0.1",
+      "LocalAet": "FAKE_SELF_AET",
+      "Port": 4242,
+      "AllowFindWorklist": true   
+    }
+  },
+  "DicomModalitiesInDatabase": false,
+  "DicomPort": 4242,
+  "DicomScpTimeout": 30,
+  "DicomScuPreferredTransferSyntax": "1.2.840.10008.1.2.1",
+  "DicomScuTimeout": 10,
+  "DicomServerEnabled": true,
+  "DicomThreadsCount": 4,
+  "DicomTlsEnabled": false,
+  "DicomTlsRemoteCertificateRequired": true,
+  "DicomWeb": {
+    "Servers": {
+      "sample": [
+        "http://localhost:8042/dicom-web/",
+        "alice",
         "orthanctest"
-       ],
-       "AllowedHosts": ["my-allowed-domain.com", "my2.allowed.*", "my3.*.com", "*.white-listed.com"]
-      }
-     }, 
-     "Dictionary": {
-      "0009,0010": [
-       "LO", 
-       "Private data element", 
-       1, 
-       1, 
-       "Lunit"
-      ], 
-      "0009,1001": [
-       "DS", 
-       "Abnormality score", 
-       1, 
-       1, 
-       "Lunit"
-      ], 
-      "00e1,10c2": [
-       "UI", 
-       "PET-CT Multi Modality Name", 
-       1, 
-       1, 
-       "ELSCINT1"
-      ], 
-      "4321,1012": [
-       "LO", 
-       "RadioButton3", 
-       1, 
-       1, 
-       "RadioLogic"
-      ], 
-      "7053,1003": [
-       "ST", 
-       "Original Image Filename", 
-       1, 
-       1, 
-       "Philips PET Private Group"
-      ],
-      "0405,1001" : ["CS", "PatternType", 1, 1, "99CZM_CapeCod_OctSettings" ],
-      "0405,101a" : ["FL", "SignalStrength", 1, 1, "99CZM_CapeCod_OctSettings" ],
-      "0407,1001" : ["US", "UndefinedPrivateTag1001", 1, 1, "99CZM_CapeCod_OctGeneral" ],
-      "0407,1002" : ["US", "UndefinedPrivateTag1002", 1, 1, "99CZM_CapeCod_OctGeneral" ],
-      "0407,1003" : ["US", "UndefinedPrivateTag1003", 1, 1, "99CZM_CapeCod_OctGeneral" ],
-      "0407,1005" : ["SQ", "OCTCubeSequence2", 1, 1, "99CZM_CapeCod_OctGeneral" ], 
-      "0407,10a1" : ["SQ", "OCTCubeSequence", 1, 1, "99CZM_CapeCod_OctGeneral" ], 
-      "2301,1002" : ["CS", "Favorite", 1, 1, "99CZM_FORUM" ]
-     }, 
-     "ExecuteLuaEnabled": true, 
-     "Gdcm": {
-       "RestrictTransferSyntaxes": []
-     },
-     "HttpCompressionEnabled": false, 
-     "HttpDescribeErrors": true, 
-     "HttpPort": 8042, 
-     "HttpProxy": "", 
-     "HttpRequestTimeout": 30, 
-     "HttpServerEnabled": true, 
-     "HttpThreadsCount": 50, 
-     "HttpTimeout": 2, 
-     "HttpVerbose": false, 
-     "HttpsCACertificates": "/etc/ssl/certs/ca-certificates.crt", 
-     "HttpsVerifyPeers": true, 
-     "IndexDirectory": "/var/lib/orthanc/db/", 
-     "IngestTranscodingOfCompressed": true, 
-     "IngestTranscodingOfUncompressed": true, 
-     "JobsHistorySize": 1000, 
-     "LimitFindInstances": 20, 
-     "LimitFindResults": 10, 
-     "LoadPrivateDictionary": true, 
-     "LogExportedResources": true, 
-     "LuaScripts": [], 
-     "MallocArenaMax": 5, 
-     "MaximumPatientCount": 0, 
-     "MaximumPduLength": 16384, 
-     "MaximumStorageCacheSize": 128, 
-     "MaximumStorageSize": 0, 
-     "MediaArchiveSize": 1, 
-     "MetricsEnabled": true, 
-     "Name": "MyOrthanc", 
-   "OrthancExplorerEnabled": true, 
-   "OrthancPeers": {
+      ]
+    },
+    "AllowedHosts": ["my-allowed-domain.com", "my2.allowed.*", "my3.*.com", "*.white-listed.com", "orthanc-under-tests:8042"]
+  },
+  "Dictionary": {
+    "0009,0010": [
+      "LO",
+      "Private data element",
+      1,
+      1,
+      "Lunit"
+    ],
+    "0009,1001": [
+      "DS",
+      "Abnormality score",
+      1,
+      1,
+      "Lunit"
+    ],
+    "00e1,10c2": [
+      "UI",
+      "PET-CT Multi Modality Name",
+      1,
+      1,
+      "ELSCINT1"
+    ],
+    "4321,1012": [
+      "LO",
+      "RadioButton3",
+      1,
+      1,
+      "RadioLogic"
+    ],
+    "7053,1003": [
+      "ST",
+      "Original Image Filename",
+      1,
+      1,
+      "Philips PET Private Group"
+    ],
+    "0405,1001" : ["CS", "PatternType", 1, 1, "99CZM_CapeCod_OctSettings" ],
+    "0405,101a" : ["FL", "SignalStrength", 1, 1, "99CZM_CapeCod_OctSettings" ],
+    "0407,1001" : ["US", "UndefinedPrivateTag1001", 1, 1, "99CZM_CapeCod_OctGeneral" ],
+    "0407,1002" : ["US", "UndefinedPrivateTag1002", 1, 1, "99CZM_CapeCod_OctGeneral" ],
+    "0407,1003" : ["US", "UndefinedPrivateTag1003", 1, 1, "99CZM_CapeCod_OctGeneral" ],
+    "0407,1005" : ["SQ", "OCTCubeSequence2", 1, 1, "99CZM_CapeCod_OctGeneral" ], 
+    "0407,10a1" : ["SQ", "OCTCubeSequence", 1, 1, "99CZM_CapeCod_OctGeneral" ], 
+    "2301,1002" : ["CS", "Favorite", 1, 1, "99CZM_FORUM" ]
+  },
+  "ExecuteLuaEnabled": true,
+  "HttpCompressionEnabled": false,
+  "HttpDescribeErrors": true,
+  "HttpPort": 8042,
+  "HttpProxy": "",
+  "HttpRequestTimeout": 30,
+  "HttpServerEnabled": true,
+  "HttpThreadsCount": 50,
+  "HttpTimeout": 2,
+  "HttpVerbose": false,
+  "HttpsCACertificates": "/etc/ssl/certs/ca-certificates.crt",
+  "HttpsVerifyPeers": true,
+  "IndexDirectory": "/var/lib/orthanc/db/",
+  "IngestTranscodingOfCompressed": true,
+  "IngestTranscodingOfUncompressed": true,
+  "JobsHistorySize": 1000,
+  "LimitFindInstances": 20,
+  "LimitFindResults": 10,
+  "LoadPrivateDictionary": true,
+  "LogExportedResources": true,
+  "LuaScripts": [],
+  "MallocArenaMax": 5,
+  "MaximumPatientCount": 0,
+  "MaximumPduLength": 16384,
+  "MaximumStorageCacheSize": 128,
+  "MaximumStorageSize": 0,
+  "MediaArchiveSize": 1,
+  "MetricsEnabled": true,
+  "Name": "MyOrthanc",
+  "OrthancExplorerEnabled": true,
+  "OrthancPeers": {
     "peer": [
-     "http://orthanc-tests:5000/", 
-     "alice", 
-     "orthanctest"
-    ], 
+      "http://orthanc-tests:5000/",
+      "alice",
+      "orthanctest"
+    ],
     "self": {
-     "Password": "orthanctest", 
-     "Url": "http://127.0.0.1:8042/", 
-     "Username": "alice"
-    }, 
+      "Password": "orthanctest",
+      "Url": "http://127.0.0.1:8042/",
+      "Username": "alice"
+    },
     "transfers-bidirectional": {
-     "Password": "orthanctest", 
-     "RemoteSelf": "transfers-bidirectional", 
-     "Url": "http://localhost:8042/", 
-     "Username": "alice"
-    }, 
+      "Password": "orthanctest",
+      "RemoteSelf": "transfers-bidirectional",
+      "Url": "http://localhost:8042/",
+      "Username": "alice"
+    },
     "transfers-simple": {
-     "Password": "orthanctest", 
-     "Url": "http://localhost:8042/", 
-     "Username": "alice"
+      "Password": "orthanctest",
+      "Url": "http://localhost:8042/",
+      "Username": "alice"
     }
-   }, 
-   "OrthancPeersInDatabase": false, 
-   "OverwriteInstances": true, 
-   "QueryRetrieveSize": 100, 
-   "RegisteredUsers": {
+  },
+  "OrthancPeersInDatabase": false,
+  "OverwriteInstances": true,
+  "QueryRetrieveSize": 100,
+  "RegisteredUsers": {
     "alice": "orthanctest"
-   }, 
-   "RemoteAccessAllowed": true, 
-   "SaveJobs": false, 
-   "SslCertificate": "certificate.pem", 
-   "SslEnabled": false, 
-   "SslMinimumProtocolVersion": 4, 
-   "SslTrustedClientCertificates": "trustedClientCertificates.pem", 
-   "SslVerifyPeers": false, 
-   "StableAge": 1, 
-   "StorageAccessOnFind": "Always", 
-   "StorageCommitmentReportsSize": 100, 
-   "StorageCompression": false, 
-   "StorageDirectory": "/var/lib/orthanc/db/", 
-   "StoreDicom": true, 
-   "StoreMD5ForAttachments": true, 
-   "StrictAetComparison": false, 
-   "SyncStorageArea": false, 
-   "SynchronousCMove": false, 
-   "SynchronousZipStream": true, 
-   "TcpNoDelay": true, 
-   "TranscodeDicomProtocol": true, 
-   "UnknownSopClassAccepted": false, 
-   "UserContentType": {}, 
-   "UserMetadata": {
-     "my-metadata": 1098
-   },
-   "WebDavDeleteAllowed": true, 
-   "WebDavEnabled": true, 
-   "WebDavUploadAllowed": true, 
-   "Worklists": {
-     "Database": "/worklists", 
-     "Enable": true
-   }, 
-   "ZipLoaderThreads": 0
+  },
+  "RemoteAccessAllowed": true,
+  "SaveJobs": false,
+  "SslCertificate": "certificate.pem",
+  "SslEnabled": false,
+  "SslMinimumProtocolVersion": 4,
+  "SslTrustedClientCertificates": "trustedClientCertificates.pem",
+  "SslVerifyPeers": false,
+  "StableAge": 1,
+  "StorageAccessOnFind": "Always",
+  "StorageCommitmentReportsSize": 100,
+  "StorageCompression": false,
+  "StorageDirectory": "/var/lib/orthanc/db/",
+  "StoreDicom": true,
+  "StoreMD5ForAttachments": true,
+  "StrictAetComparison": false,
+  "SyncStorageArea": false,
+  "SynchronousCMove": false,
+  "SynchronousZipStream": true,
+  "TcpNoDelay": true,
+  "TranscodeDicomProtocol": true,
+  "UnknownSopClassAccepted": false,
+  "UserContentType": {},
+  "UserMetadata": {
+    "my-metadata": 1098
+  },
+  "WebDavDeleteAllowed": true,
+  "WebDavEnabled": true,
+  "WebDavUploadAllowed": true,
+  "Worklists": {
+    "Database": "/worklists",
+    "Enable": true
+  },
+  "ZipLoaderThreads": 0,
+  "Gdcm": {
+    "Comment": "When it is enabled, it is enabled for all TS",
+    "RestrictTransferSyntaxes": []
   }
-  
\ No newline at end of file
+}
\ No newline at end of file
--- a/Tests/Tests.py	Fri Sep 25 16:24:42 2026 +0200
+++ b/Tests/Tests.py	Mon Sep 28 10:01:08 2026 +0200
@@ -4406,8 +4406,7 @@
                             str(_REMOTE['DicomPort']),
                             '--study', '-k', 'QueryRetrieveLevel=Study',
                             '-k', 'StudyInstanceUID=2.16.840.1.113669.632.20.121711.10000160881'
-                        ],
-                        stderr = FNULL)
+                        ])
 
                 except subprocess.CalledProcessError as e:
                     print('movescu failed with error code: %s' % str(e.returncode))
--- a/Tests/Toolbox.py	Fri Sep 25 16:24:42 2026 +0200
+++ b/Tests/Toolbox.py	Mon Sep 28 10:01:08 2026 +0200
@@ -421,7 +421,7 @@
             while (not stop_event.is_set()):
                 error = external.poll()
                 if error != None:
-                    print('Error while executing external command: %s', command)
+                    print('Error while executing external command: %s' % command)
                     output.seek(0)
                     print("--------------")
                     print(output.read())