[java-idp-integration-tests COMMIT] in /trunk/src/test/java/net/shibboleth/idp/test: BaseIntegrationTest.java JettySe...
noreply at shibboleth.net
noreply at shibboleth.net
Fri Jan 16 13:03:15 EST 2015
Author: tzeller
Date: Fri Jan 16 13:03:15 2015
New Revision: 46
URL: http://svn.shibboleth.net/view/java-idp-integration-tests?rev=46&view=rev
Log:
Add POST binding and isPassive and ForceAuthn tests.
Ping IdP status page rather than polling log files when waiting for Jetty server startup.
Added:
trunk/src/test/java/net/shibboleth/idp/test/saml2/SAML2SSOPOSTIntegrationTest.java (with props)
trunk/src/test/java/net/shibboleth/idp/test/saml2/SAML2SSORedirectIntegrationTest.java (with props)
Modified:
trunk/src/test/java/net/shibboleth/idp/test/BaseIntegrationTest.java
trunk/src/test/java/net/shibboleth/idp/test/JettyServerProcess.java
trunk/src/test/java/net/shibboleth/idp/test/StatusTest.java
trunk/src/test/java/net/shibboleth/idp/test/saml1/AbstractSAML1IntegrationTest.java
trunk/src/test/java/net/shibboleth/idp/test/saml1/AbstractSAML1UnsolicitedSSOIntegrationTest.java
trunk/src/test/java/net/shibboleth/idp/test/saml1/SAML1UnsolicitedSSOIntegrationTest.java
trunk/src/test/java/net/shibboleth/idp/test/saml2/AbstractSAML2IntegrationTest.java
trunk/src/test/java/net/shibboleth/idp/test/saml2/AbstractSAML2UnsolicitedSSOIntegrationTest.java
trunk/src/test/java/net/shibboleth/idp/test/saml2/SAML2UnsolicitedSSOIntegrationTest.java
trunk/src/test/java/net/shibboleth/idp/test/saml2/SAML2UnsolicitedSSOPerAttributeConsentIntegrationTest.java
trunk/src/test/java/net/shibboleth/idp/test/saml2/SAML2UnsolicitedSSOTermsOfUseIntegrationTest.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=46&r1=45&r2=46&view=diff
==============================================================================
--- trunk/src/test/java/net/shibboleth/idp/test/BaseIntegrationTest.java (original)
+++ trunk/src/test/java/net/shibboleth/idp/test/BaseIntegrationTest.java Fri Jan 16 13:03:15 2015
@@ -25,6 +25,7 @@
import java.nio.file.StandardCopyOption;
import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
import net.shibboleth.idp.installer.PropertiesWithComments;
import net.shibboleth.utilities.java.support.annotation.constraint.NonnullAfterInit;
@@ -61,6 +62,9 @@
*/
public abstract class BaseIntegrationTest {
+ /** Base web server URL. */
+ @Nonnull public final static String BASE_URL = "https://localhost:8443";
+
/** Directory in which distributions will be unpackaged. */
@Nonnull public final static String TEST_DISTRIBUTIONS_DIRECTORY = "test-distributions";
@@ -135,6 +139,21 @@
/** Web driver. */
@Nonnull protected WebDriver driver;
+
+ /** URL to start the flow. */
+ @Nullable protected String startFlowURL;
+
+ /** URL of login page. */
+ @Nullable protected String loginPageURL;
+
+ /** URL of page containing the SAML response at the SP. */
+ @Nullable protected String responsePageURL;
+
+ /** URL to start the passive flow. */
+ @Nullable protected String isPassiveRequestURL;
+
+ /** URL to start the force authn flow. */
+ @Nullable protected String forceAuthnRequestURL;
/** Class logger. */
@Nonnull private final Logger log = LoggerFactory.getLogger(BaseIntegrationTest.class);
@@ -247,9 +266,12 @@
/**
* Start the Jetty server.
*
+ * Note : this method must be called in each test to allow for customization of the IdP configuration before the
+ * server is started.
+ *
* @throws ComponentInitializationException if the server cannot be initialized
*/
- @BeforeMethod public void startJettyServer() throws ComponentInitializationException {
+ public void startJettyServer() throws ComponentInitializationException {
server = new JettyServerProcess(pathToJettyBase, pathToJettyHome);
server.initialize();
server.start();
@@ -344,10 +366,45 @@
}
/**
+ * Restore idp.properties and relying-party.xml configuration files.
+ *
+ * @throws Exception if an error occurs
+ */
+ @AfterMethod(alwaysRun = true) public void restoreConfiguration() throws IOException {
+ restoreIdPProperties();
+ restoreRelyingPartyXML();
+ }
+
+ /**
+ * Enable per attribute consent.
+ *
+ * @throws IOException
+ */
+ public void enablePerAttributeConsent() throws IOException {
+ replaceIdPProperty("idp.consent.allowPerAttribute", "true");
+ }
+
+ /**
+ * Activate terms-of-use flow.
+ *
+ * @throws Exception
+ */
+ public void enableCustomRelyingPartyConfiguration() 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");
[... 1228 lines stripped ...]
More information about the commits
mailing list