[cpp-opensaml] 16/19: Enable skipping tests which require network access
Scott Cantor
cantor.2 at osu.edu
Tue Jun 26 19:28:14 EDT 2018
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository cpp-opensaml.
View the commit online:
http://git.shibboleth.net/view/?p=cpp-opensaml.git;a=commit;h=112e4953e9045a879c0ae98760ba5ba2c3cc0b21
commit 112e4953e9045a879c0ae98760ba5ba2c3cc0b21
Author: Ferenc Wágner <wferi at niif.hu>
AuthorDate: Thu Aug 25 17:04:27 2016 +0200
Enable skipping tests which require network access
These either require a fresh download of the InCommon metadata
or online access to it. However, buildds don't provide network
access and an arbitrary snapshot would eventually expire.
---
samltest/internal.h | 6 ++++++
samltest/saml2/metadata/XMLMetadataProviderTest.h | 4 ++++
2 files changed, 10 insertions(+)
diff --git a/samltest/internal.h b/samltest/internal.h
index 10706f4..dfecba8 100644
--- a/samltest/internal.h
+++ b/samltest/internal.h
@@ -125,6 +125,12 @@ protected:
}
}
+ void skipNetworked() {
+ if (getenv("SAMLTEST_SKIP_NETWORKED")) {
+ TS_SKIP("requires network access");
+ }
+ }
+
public:
void setUp() {
ParserPool& p=XMLToolingConfig::getConfig().getParser();
diff --git a/samltest/saml2/metadata/XMLMetadataProviderTest.h b/samltest/saml2/metadata/XMLMetadataProviderTest.h
index 4397dc0..a632e6e 100644
--- a/samltest/saml2/metadata/XMLMetadataProviderTest.h
+++ b/samltest/saml2/metadata/XMLMetadataProviderTest.h
@@ -94,6 +94,7 @@ public:
}
void testXMLProvider() {
+ skipNetworked();
string config = data_path + "saml2/metadata/XMLMetadataProvider.xml";
ifstream in(config.c_str());
DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(in);
@@ -137,6 +138,7 @@ public:
void testHTTPProvider()
{
+ skipNetworked();
string config = data_path + "saml2/metadata/HTTPMetadataProvider.xml";
ifstream in(config.c_str());
DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(in);
@@ -180,6 +182,7 @@ public:
void testXMLWithBlacklists() {
+ skipNetworked();
string config = data_path + "saml2/metadata/XMLWithBlacklists.xml";
ifstream in(config.c_str());
DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(in);
@@ -210,6 +213,7 @@ public:
}
void testXMLWithWhitelists() {
+ skipNetworked();
string config = data_path + "saml2/metadata/XMLWithWhitelists.xml";
ifstream in(config.c_str());
DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(in);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list