Package: xmltooling / 1.6.0-4+deb9u2

Enable-skipping-tests-which-require-network-access.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi@niif.hu>
Date: Thu, 1 Sep 2016 22:47:51 +0200
Subject: Enable skipping tests which require network access

---
 xmltoolingtest/SecurityHelperTest.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/xmltoolingtest/SecurityHelperTest.h b/xmltoolingtest/SecurityHelperTest.h
index 545ca48..bb82e30 100644
--- a/xmltoolingtest/SecurityHelperTest.h
+++ b/xmltoolingtest/SecurityHelperTest.h
@@ -33,6 +33,13 @@ class SecurityHelperTest : public CxxTest::TestSuite {
         string scheme(addr.m_endpoint, strchr(addr.m_endpoint,':') - addr.m_endpoint);
         return XMLToolingConfig::getConfig().SOAPTransportManager.newPlugin(scheme.c_str(), addr);
     }
+
+    void skipNetworked() {
+        if (getenv("XMLTOOLINGTEST_SKIP_NETWORKED")) {
+            TS_SKIP("requires network access");
+        }
+    }
+
 public:
     void setUp() {
     }
@@ -59,6 +66,7 @@ public:
     }
 
     void testKeysFromURLs() {
+        skipNetworked();
         string pathname = data_path + "key.pem.bak";
         auto_ptr<SOAPTransport> t1(getTransport("https://wiki.shibboleth.net/confluence/download/attachments/3277026/key.pem"));
         auto_ptr<XSECCryptoKey> key1(SecurityHelper::loadKeyFromURL(*t1.get(), pathname.c_str()));
@@ -110,6 +118,7 @@ public:
     }
 
     void testCertificatesFromURLs() {
+        skipNetworked();
         string pathname = data_path + "cert.pem.bak";
         auto_ptr<SOAPTransport> t1(getTransport("https://wiki.shibboleth.net/confluence/download/attachments/3277026/cert.pem"));
         SecurityHelper::loadCertificatesFromURL(certs, *t1.get(), pathname.c_str());