[xmltooling] 03/04: New patch Delete-unit-tests-that-use-the-network-wheezy-only.patch
Etienne Dysli Metref
edm-guest at moszumanska.debian.org
Fri Sep 23 12:42:18 UTC 2016
This is an automated email from the git hooks/post-receive script.
edm-guest pushed a commit to branch debian/wheezy-backports-sloppy
in repository xmltooling.
commit 78061faf84588eff2f5d94d766cc02b7dfa0272e
Author: Etienne Dysli Metref <etienne.dysli-metref at switch.ch>
Date: Thu Sep 22 08:32:32 2016 +0200
New patch Delete-unit-tests-that-use-the-network-wheezy-only.patch
Since the version of cxxtest in wheezy (4.0) does not support skipping
tests, delete networked tests because they cannot pass in Debian's
build environment where networking is disabled.
---
...it-tests-that-use-the-network-wheezy-only.patch | 81 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 82 insertions(+)
diff --git a/debian/patches/Delete-unit-tests-that-use-the-network-wheezy-only.patch b/debian/patches/Delete-unit-tests-that-use-the-network-wheezy-only.patch
new file mode 100644
index 0000000..9b2b57b
--- /dev/null
+++ b/debian/patches/Delete-unit-tests-that-use-the-network-wheezy-only.patch
@@ -0,0 +1,81 @@
+From: Etienne Dysli Metref <etienne.dysli-metref at switch.ch>
+Date: Thu, 22 Sep 2016 08:28:22 +0200
+Subject: Delete unit tests that use the network (wheezy only)
+
+These cannot pass in Debian's build environment where networking is
+disabled. Moreover, the version of cxxtest in wheezy does not support
+skipping tests.
+---
+ xmltoolingtest/SecurityHelperTest.h | 47 -------------------------------------
+ 1 file changed, 47 deletions(-)
+
+diff --git a/xmltoolingtest/SecurityHelperTest.h b/xmltoolingtest/SecurityHelperTest.h
+index bb82e30..1812108 100644
+--- a/xmltoolingtest/SecurityHelperTest.h
++++ b/xmltoolingtest/SecurityHelperTest.h
+@@ -34,12 +34,6 @@ class SecurityHelperTest : public CxxTest::TestSuite {
+ return XMLToolingConfig::getConfig().SOAPTransportManager.newPlugin(scheme.c_str(), addr);
+ }
+
+- void skipNetworked() {
+- if (getenv("XMLTOOLINGTEST_SKIP_NETWORKED")) {
+- TS_SKIP("requires network access");
+- }
+- }
+-
+ public:
+ void setUp() {
+ }
+@@ -65,22 +59,6 @@ public:
+ TSM_ASSERT("Different keys matched", !SecurityHelper::matches(*key3.get(), *key4.get()));
+ }
+
+- 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()));
+- pathname = data_path + "key.der.bak";
+- auto_ptr<SOAPTransport> t2(getTransport("https://wiki.shibboleth.net/confluence/download/attachments/3277026/key.der"));
+- auto_ptr<XSECCryptoKey> key2(SecurityHelper::loadKeyFromURL(*t2.get(), pathname.c_str()));
+- pathname = data_path + "test.pfx.bak";
+- auto_ptr<SOAPTransport> t3(getTransport("https://wiki.shibboleth.net/confluence/download/attachments/3277026/test.pfx"));
+- auto_ptr<XSECCryptoKey> key3(SecurityHelper::loadKeyFromURL(*t3.get(), pathname.c_str(), nullptr, "password"));
+-
+- TSM_ASSERT("PEM/DER keys did not match", SecurityHelper::matches(*key1.get(), *key2.get()));
+- TSM_ASSERT("DER/PKCS12 keys did not match", SecurityHelper::matches(*key2.get(), *key3.get()));
+- }
+-
+ void testCertificatesFromFiles() {
+ string pathname = data_path + "cert.pem";
+ SecurityHelper::loadCertificatesFromFile(certs, pathname.c_str());
+@@ -116,29 +94,4 @@ public:
+ for_each(certs.begin(), certs.end(), xmltooling::cleanup<XSECCryptoX509>());
+ certs.clear();
+ }
+-
+- 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());
+- pathname = data_path + "cert.der.bak";
+- auto_ptr<SOAPTransport> t2(getTransport("https://wiki.shibboleth.net/confluence/download/attachments/3277026/cert.der"));
+- SecurityHelper::loadCertificatesFromURL(certs, *t2.get(), pathname.c_str());
+- pathname = data_path + "test.pfx.bak";
+- auto_ptr<SOAPTransport> t3(getTransport("https://wiki.shibboleth.net/confluence/download/attachments/3277026/test.pfx"));
+- SecurityHelper::loadCertificatesFromURL(certs, *t3.get(), pathname.c_str(), nullptr, "password");
+-
+- TSM_ASSERT_EQUALS("Wrong certificate count", certs.size(), 3);
+-
+- auto_ptr<XSECCryptoKey> key1(certs[0]->clonePublicKey());
+- auto_ptr<XSECCryptoKey> key2(certs[0]->clonePublicKey());
+- auto_ptr<XSECCryptoKey> key3(certs[0]->clonePublicKey());
+-
+- TSM_ASSERT("PEM/DER keys did not match", SecurityHelper::matches(*key1.get(), *key2.get()));
+- TSM_ASSERT("DER/PKCS12 keys did not match", SecurityHelper::matches(*key2.get(), *key3.get()));
+-
+- for_each(certs.begin(), certs.end(), xmltooling::cleanup<XSECCryptoX509>());
+- certs.clear();
+- }
+ };
diff --git a/debian/patches/series b/debian/patches/series
index d03b947..4956122 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -20,3 +20,4 @@ Add-separate-pkg-config-file-for-xmltooling-lite.patch
Enable-skipping-tests-which-require-network-access.patch
Enable-the-dot-feature-of-Doxygen.patch
Remove-PKG_INSTALLDIR-to-build-with-older-pkg-config.patch
+Delete-unit-tests-that-use-the-network-wheezy-only.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-shibboleth/xmltooling.git
More information about the Pkg-shibboleth-devel
mailing list