[java-idp-integration-tests COMMIT] in /trunk/src/test: conf/relying-party-with-consent.xml conf/relying-party.xml ja...
noreply at shibboleth.net
noreply at shibboleth.net
Tue Nov 11 18:50:13 EST 2014
Author: tzeller
Date: Tue Nov 11 18:50:13 2014
New Revision: 33
URL: http://svn.shibboleth.net/view/java-idp-integration-tests?rev=33&view=rev
Log:
IDP-506 Override relying-party.xml with relying-party-with-consent.xml in consent tests only.
Added:
trunk/src/test/conf/relying-party-with-consent.xml
- copied unchanged from r32, trunk/src/test/conf/relying-party.xml
Modified:
trunk/src/test/conf/relying-party.xml
trunk/src/test/java/net/shibboleth/idp/test/BaseIntegrationTest.java
trunk/src/test/java/net/shibboleth/idp/test/saml2/SAML2UnsolicitedSSOIntegrationWithConsentTest.java
Modified: trunk/src/test/java/net/shibboleth/idp/test/BaseIntegrationTest.java
URL: http://svn.shibboleth.net/view/java-idp-integration-tests/trunk/src/test/java/net/shibboleth/idp/test/BaseIntegrationTest.java?rev=33&r1=32&r2=33&view=diff
==============================================================================
--- trunk/src/test/java/net/shibboleth/idp/test/BaseIntegrationTest.java (original)
+++ trunk/src/test/java/net/shibboleth/idp/test/BaseIntegrationTest.java Tue Nov 11 18:50:13 2014
@@ -219,8 +219,25 @@
final Path pathToIdPPropertiesDist =
Paths.get(pathToIdPHome.toAbsolutePath().toString(), "dist", "conf", "idp.properties.dist");
Assert.assertTrue(pathToIdPPropertiesDist.toFile().exists());
-
+
Files.copy(pathToIdPPropertiesDist, pathToIdPProperties, StandardCopyOption.REPLACE_EXISTING);
}
+ /**
+ * Restore conf/relying-party.xml from dist/conf/relying-party.xml.dist.
+ *
+ * @throws IOException if an I/O error occurs
+ */
+ public void restoreRelyingPartyXML() throws IOException {
+ final Path pathToRelyingParty =
+ Paths.get(pathToIdPHome.toAbsolutePath().toString(), "conf", "relying-party.xml");
+ Assert.assertTrue(pathToRelyingParty.toFile().exists());
+
+ final Path pathToRelyingPartyDist =
+ Paths.get(pathToIdPHome.toAbsolutePath().toString(), "dist", "conf", "relying-party.xml.dist");
+ Assert.assertTrue(pathToRelyingPartyDist.toFile().exists());
+
+ Files.copy(pathToRelyingPartyDist, pathToRelyingParty, StandardCopyOption.REPLACE_EXISTING);
+ }
+
}
Modified: trunk/src/test/java/net/shibboleth/idp/test/saml2/SAML2UnsolicitedSSOIntegrationWithConsentTest.java
URL: http://svn.shibboleth.net/view/java-idp-integration-tests/trunk/src/test/java/net/shibboleth/idp/test/saml2/SAML2UnsolicitedSSOIntegrationWithConsentTest.java?rev=33&r1=32&r2=33&view=diff
==============================================================================
--- trunk/src/test/java/net/shibboleth/idp/test/saml2/SAML2UnsolicitedSSOIntegrationWithConsentTest.java (original)
+++ trunk/src/test/java/net/shibboleth/idp/test/saml2/SAML2UnsolicitedSSOIntegrationWithConsentTest.java Tue Nov 11 18:50:13 2014
@@ -18,6 +18,10 @@
package net.shibboleth.idp.test.saml2;
import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.StandardCopyOption;
import javax.annotation.Nonnull;
@@ -35,7 +39,9 @@
import org.opensaml.saml.saml2.core.AuthnContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.testng.Assert;
import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@ -100,12 +106,31 @@
@Nonnull protected WebDriver driver;
/**
+ * Activate consent flows.
+ *
+ * @throws Exception
+ */
+ @BeforeClass protected void enableConsentFlows() throws Exception {
+ final Path pathToRelyingParty =
+ Paths.get(pathToIdPHome.toAbsolutePath().toString(), "conf", "relying-party.xml");
+ Assert.assertTrue(pathToRelyingParty.toFile().exists());
+
+ final Path pathToRelyingPartyWithConsent =
+ Paths.get(pathToIdPHome.toAbsolutePath().toString(), "conf", "relying-party-with-consent.xml");
+ Assert.assertTrue(pathToRelyingPartyWithConsent.toFile().exists());
+
+ Files.copy(pathToRelyingPartyWithConsent, pathToRelyingParty, StandardCopyOption.REPLACE_EXISTING);
+ }
+
+ /**
* Restore idp.properties from original source.
+ * Restore relying-party.xml from original source.
*
* @throws IOException if an I/O error occurs
*/
@AfterClass(alwaysRun = true) protected void restoreConfiguration() throws IOException {
restoreIdPProperties();
+ restoreRelyingPartyXML();
}
/**
More information about the commits
mailing list