# HG changeset patch # User Alain Mazy # Date 1655132145 -7200 # Node ID 5ac463ebf463bb50afa6524f25aa8060ab2783c0 # Parent 91d3dfdae90fbf4765c9c3a123902ee85c0feb42 added a test for lua SetHttpTimeout diff -r 91d3dfdae90f -r 5ac463ebf463 Database/Lua/HttpClient.lua --- a/Database/Lua/HttpClient.lua Tue May 10 12:17:30 2022 +0200 +++ b/Database/Lua/HttpClient.lua Mon Jun 13 16:55:45 2022 +0200 @@ -45,6 +45,18 @@ testSucceeded = testSucceeded and (response['headers']['Content-Type'] == 'application/json' and response['headers']['Toto'] == 'Tutu') if not testSucceeded then print('Failed in HttpGet') PrintRecursive(response) end + +-- Test SetHttpTimeout +SetHttpTimeout(10) +response = HttpGet('https://httpstat.us/200?sleep=1000') +testSucceeded = testSucceeded and (response == '200 OK') +if not testSucceeded then print('Failed in SetHttpTimeout1') PrintRecursive(response) end + +SetHttpTimeout(1) +response = HttpGet('https://httpstat.us/200?sleep=2000') +testSucceeded = testSucceeded and (response == nil) +if not testSucceeded then print('Failed in SetHttpTimeout2') PrintRecursive(response) end + if testSucceeded then print('OK') else diff -r 91d3dfdae90f -r 5ac463ebf463 GenerateConfigurationForTests.py --- a/GenerateConfigurationForTests.py Tue May 10 12:17:30 2022 +0200 +++ b/GenerateConfigurationForTests.py Mon Jun 13 16:55:45 2022 +0200 @@ -151,6 +151,7 @@ config['WebDavUploadAllowed'] = True config['StorageCompression'] = args.compression config['CheckRevisions'] = True +config['HttpsCACertificates'] = "/etc/ssl/certs/ca-certificates.crt" # for HTTPS lua tests (note: this path is valid only on linux !) del config['DeidentifyLogsDicomVersion'] del config['KeepAlive']