[cpp-xmltooling] 14/22: Enable skipping tests which require network access

Scott Cantor cantor.2 at osu.edu
Thu Jun 21 14:57:30 EDT 2018


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch master
in repository cpp-xmltooling.

View the commit online:
http://git.shibboleth.net/view/?p=cpp-xmltooling.git;a=commit;h=7534b6d9694b5c776fef1416c5563deb29f0c1c2

commit 7534b6d9694b5c776fef1416c5563deb29f0c1c2
Author: Ferenc Wágner <wferi at niif.hu>
AuthorDate: Thu Sep 1 22:47:51 2016 +0200

    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 6adbac4..55a06d8 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, false);
     }
+
+    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";
         scoped_ptr<SOAPTransport> t1(getTransport("https://wiki.shibboleth.net/confluence/download/attachments/3277026/key.pem"));
         scoped_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";
         scoped_ptr<SOAPTransport> t1(getTransport("https://wiki.shibboleth.net/confluence/download/attachments/3277026/cert.pem"));
         SecurityHelper::loadCertificatesFromURL(certs, *t1.get(), pathname.c_str());

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list