# HG changeset patch # User Sebastien Jodogne # Date 1503320660 -7200 # Node ID f8ef157f2d73b9ae9773c5fbcdfad9dff172fdea # Parent f47fd47b3c91df931f2743788f18102690e076fa fix unit tests given www.orthanc-server.com now mandatory uses HTTPS diff -r f47fd47b3c91 -r f8ef157f2d73 UnitTestsSources/LuaTests.cpp --- a/UnitTestsSources/LuaTests.cpp Mon Aug 21 13:53:29 2017 +0200 +++ b/UnitTestsSources/LuaTests.cpp Mon Aug 21 15:04:20 2017 +0200 @@ -287,9 +287,15 @@ { Orthanc::LuaContext lua; -#if UNIT_TESTS_WITH_HTTP_CONNEXIONS == 1 - lua.Execute("JSON = loadstring(HttpGet('http://www.orthanc-server.com/downloads/third-party/JSON.lua')) ()"); - const std::string url("http://www.orthanc-server.com/downloads/third-party/Product.json"); +#if UNIT_TESTS_WITH_HTTP_CONNEXIONS == 1 + // It is not guaranteed that the URL on server + // "www.montefiore.ulg.ac.be" will work forever. We switched to it, + // as the "www.orthanc-server.com" now mandatory uses HTTPS. + const std::string BASE = "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/"; + //const std::string BASE = "http://www.orthanc-server.com/downloads/third-party/"; + + lua.Execute("JSON = loadstring(HttpGet('" + BASE + "JSON.lua')) ()"); + const std::string url(BASE + "Product.json"); #endif std::string s; diff -r f47fd47b3c91 -r f8ef157f2d73 UnitTestsSources/RestApiTests.cpp --- a/UnitTestsSources/RestApiTests.cpp Mon Aug 21 13:53:29 2017 +0200 +++ b/UnitTestsSources/RestApiTests.cpp Mon Aug 21 15:04:20 2017 +0200 @@ -66,8 +66,15 @@ ASSERT_FALSE(c.IsVerbose()); #if UNIT_TESTS_WITH_HTTP_CONNEXIONS == 1 + // It is not guaranteed that the URL on server + // "www.montefiore.ulg.ac.be" will work forever. We switched to it, + // as the "www.orthanc-server.com" now mandatory uses HTTPS. + const std::string BASE = "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/"; + //const std::string BASE = "http://www.orthanc-server.com/downloads/third-party/"; + Json::Value v; - c.SetUrl("http://www.orthanc-server.com/downloads/third-party/Product.json"); + c.SetUrl(BASE + "Product.json"); + c.Apply(v); ASSERT_TRUE(v.type() == Json::objectValue); ASSERT_TRUE(v.isMember("Description"));