[java-idp-integration-tests] 02/03: Bump Selenium
Tom Zeller
tzeller at dragonacea.biz
Sat Jan 7 16:24:53 UTC 2023
This is an automated email from the git hooks/post-receive script.
tzeller pushed a commit to branch main
in repository java-idp-integration-tests.
View the commit online:
http://git.shibboleth.net/view/?p=java-idp-integration-tests.git;a=commit;h=a506d85f89ec97226ea9801fc78f1afd3087c1bc
commit a506d85f89ec97226ea9801fc78f1afd3087c1bc
Author: Tom Zeller <tzeller at dragonacea.biz>
AuthorDate: Fri Jan 6 18:14:29 2023 -0600
Bump Selenium
Remove ldaptive dependency as its dependency on Netty conflicts with
Selenium's
As a side effect, only enable CAS for the CAS tests
---
pom.xml | 23 ++++----
.../idp/integration/tests/BaseIntegrationTest.java | 62 +++++-----------------
2 files changed, 27 insertions(+), 58 deletions(-)
diff --git a/pom.xml b/pom.xml
index d49baab..6334fb2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -40,7 +40,7 @@
<!-- OpenSAML -->
<opensaml.version>5.0.0-SNAPSHOT</opensaml.version>
- <selenium.version>4.3.0</selenium.version>
+ <selenium.version>4.7.2</selenium.version>
<test-distributions.directory>${project.basedir}/test-distributions</test-distributions.directory>
<idp-to-be-tested.directory>${test-distributions.directory}/shibboleth-identity-provider-${idp-to-be-tested.version}</idp-to-be-tested.directory>
@@ -101,10 +101,6 @@
</dependency>
<!-- Runtime Dependencies -->
- <dependency>
- <groupId>org.ldaptive</groupId>
- <artifactId>ldaptive</artifactId>
- </dependency>
<!-- Test Dependencies -->
<dependency>
@@ -117,11 +113,6 @@
<artifactId>shib-support</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>net.shibboleth.idp</groupId>
- <artifactId>idp-admin-api</artifactId>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>net.shibboleth.idp</groupId>
<artifactId>idp-installer</artifactId>
@@ -146,6 +137,12 @@
<version>${testbed.version}</version>
<scope>test</scope>
<type>war</type>
+ <exclusions>
+ <exclusion>
+ <groupId>org.ldaptive</groupId>
+ <artifactId>ldaptive</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>net.shibboleth.idp</groupId>
@@ -154,6 +151,12 @@
<scope>test</scope>
<type>jar</type>
<classifier>${testbed.classifier}</classifier>
+ <exclusions>
+ <exclusion>
+ <groupId>org.ldaptive</groupId>
+ <artifactId>ldaptive</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.opensaml</groupId>
diff --git a/src/test/java/net/shibboleth/idp/integration/tests/BaseIntegrationTest.java b/src/test/java/net/shibboleth/idp/integration/tests/BaseIntegrationTest.java
index 88f6b8f..c4c8e6a 100644
--- a/src/test/java/net/shibboleth/idp/integration/tests/BaseIntegrationTest.java
+++ b/src/test/java/net/shibboleth/idp/integration/tests/BaseIntegrationTest.java
@@ -38,8 +38,6 @@ import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashSet;
@@ -47,7 +45,6 @@ import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Random;
-import java.util.ServiceLoader;
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
@@ -57,20 +54,6 @@ import java.util.regex.Pattern;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
-import net.shibboleth.idp.installer.PropertiesWithComments;
-import net.shibboleth.idp.module.IdPModule;
-import net.shibboleth.idp.module.ModuleContext;
-import net.shibboleth.idp.module.ModuleException;
-import net.shibboleth.shared.annotation.constraint.NonnullAfterInit;
-import net.shibboleth.shared.annotation.constraint.NonnullElements;
-import net.shibboleth.shared.annotation.constraint.NotEmpty;
-import net.shibboleth.shared.component.ComponentInitializationException;
-import net.shibboleth.shared.httpclient.HttpClientBuilder;
-import net.shibboleth.shared.logic.Constraint;
-import net.shibboleth.shared.net.URLBuilder;
-import net.shibboleth.shared.primitive.StringSupport;
-import net.shibboleth.shared.xml.ParserPool;
-
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
@@ -116,6 +99,16 @@ import org.testng.annotations.BeforeMethod;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Listeners;
+import net.shibboleth.idp.installer.PropertiesWithComments;
+import net.shibboleth.shared.annotation.constraint.NonnullAfterInit;
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+import net.shibboleth.shared.component.ComponentInitializationException;
+import net.shibboleth.shared.httpclient.HttpClientBuilder;
+import net.shibboleth.shared.logic.Constraint;
+import net.shibboleth.shared.net.URLBuilder;
+import net.shibboleth.shared.primitive.StringSupport;
+import net.shibboleth.shared.xml.ParserPool;
+
/**
* Abstract integration test which tests the IdP via the testbed using Selenium.
@@ -498,10 +491,8 @@ public abstract class BaseIntegrationTest {
listModules();
enableModule("idp.intercept.Consent");
- enableModule("idp.profile.CAS");
listModules();
assertModulesAreEnabled("idp.intercept.Consent");
- assertModulesAreEnabled("idp.profile.CAS");
// Copy directories from idp distribution to idp home
copyFromIdPDistToIdPHome("metadata");
@@ -528,29 +519,6 @@ public abstract class BaseIntegrationTest {
// Set idp.home system property, replace '\' with '/' for Windows
System.setProperty("idp.home", pathToIdPHome.toAbsolutePath().toString().replace('\\', '/'));
}
-
- /**
- * Enable one or more modules.
- *
- * @param modules modules to enable
- * @param idpHome location of IdP
- *
- * @throws ModuleException if an error occurs
- */
- protected void enableModules(@Nonnull @NonnullElements final Collection<String> modules,
- @Nonnull final Path idpHome) throws ModuleException {
-
- final ModuleContext context = new ModuleContext(idpHome);
- log.trace("Module context {}", context);
-
- for (final IdPModule module : ServiceLoader.load(IdPModule.class)) {
- log.trace("Found module {}", module);
- if (modules.contains(module.getId())) {
- log.trace("Enabling module {}", module);
- module.enable(context);
- }
- }
- }
/**
* Set up paths to Tomcat if they exist.
@@ -1403,19 +1371,17 @@ public abstract class BaseIntegrationTest {
* Enable CAS for the default relying party.
*
* @throws IOException if an error occurs replacing text in relying-party.xml
- * @throws ModuleException if an error occurs
*/
- public void enableCAS() throws IOException, ModuleException {
+ public void enableCAS() throws IOException {
final Path pathToRelyingPartyXML = Paths.get("conf", "relying-party.xml");
final String regex = "<ref bean=\"SAML2.ArtifactResolution\" />";
final String replacement = regex + "\n" + "<ref bean=\"CAS.LoginConfiguration\" />\n"
+ "<ref bean=\"CAS.ProxyConfiguration\" />\n" + "<ref bean=\"CAS.ValidateConfiguration\" />";
replaceIdPHomeFile(pathToRelyingPartyXML, regex, replacement);
-
- if (!idpVersion.startsWith("3")) {
- enableModules(Collections.singletonList("idp.profile.CAS"), pathToIdPHome);
- }
+
+ enableModule("idp.profile.CAS");
+ assertModulesAreEnabled("idp.profile.CAS");
}
/**
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list