comparison UnitTestsSources/RestApiTests.cpp @ 2363:f8ef157f2d73

fix unit tests given www.orthanc-server.com now mandatory uses HTTPS
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 21 Aug 2017 15:04:20 +0200
parents a3a65de1840f
children 883387e2b379
comparison
equal deleted inserted replaced
2362:f47fd47b3c91 2363:f8ef157f2d73
64 ASSERT_TRUE(c.IsVerbose()); 64 ASSERT_TRUE(c.IsVerbose());
65 c.SetVerbose(false); 65 c.SetVerbose(false);
66 ASSERT_FALSE(c.IsVerbose()); 66 ASSERT_FALSE(c.IsVerbose());
67 67
68 #if UNIT_TESTS_WITH_HTTP_CONNEXIONS == 1 68 #if UNIT_TESTS_WITH_HTTP_CONNEXIONS == 1
69 // It is not guaranteed that the URL on server
70 // "www.montefiore.ulg.ac.be" will work forever. We switched to it,
71 // as the "www.orthanc-server.com" now mandatory uses HTTPS.
72 const std::string BASE = "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/";
73 //const std::string BASE = "http://www.orthanc-server.com/downloads/third-party/";
74
69 Json::Value v; 75 Json::Value v;
70 c.SetUrl("http://www.orthanc-server.com/downloads/third-party/Product.json"); 76 c.SetUrl(BASE + "Product.json");
77
71 c.Apply(v); 78 c.Apply(v);
72 ASSERT_TRUE(v.type() == Json::objectValue); 79 ASSERT_TRUE(v.type() == Json::objectValue);
73 ASSERT_TRUE(v.isMember("Description")); 80 ASSERT_TRUE(v.isMember("Description"));
74 #endif 81 #endif
75 } 82 }