[java-idp-integration-tests] 03/04: Expose IdP version derived from distribution name
Tom Zeller
tzeller at dragonacea.biz
Tue Jan 28 14:23:31 EST 2020
This is an automated email from the git hooks/post-receive script.
tzeller pushed a commit to branch master
in repository java-idp-integration-tests.
View the commit online:
http://git.shibboleth.net/view/?p=java-idp-integration-tests.git;a=commit;h=c966ccd16c193520506c536a77a665c0bc269bae
commit c966ccd16c193520506c536a77a665c0bc269bae
Author: Tom Zeller <tzeller at dragonacea.biz>
AuthorDate: Tue Jan 28 13:22:27 2020 -0600
Expose IdP version derived from distribution name
---
.../java/net/shibboleth/idp/test/BaseIntegrationTest.java | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/test/java/net/shibboleth/idp/test/BaseIntegrationTest.java b/src/test/java/net/shibboleth/idp/test/BaseIntegrationTest.java
index 5f891f4..770bce0 100644
--- a/src/test/java/net/shibboleth/idp/test/BaseIntegrationTest.java
+++ b/src/test/java/net/shibboleth/idp/test/BaseIntegrationTest.java
@@ -35,6 +35,7 @@ import java.util.Iterator;
import java.util.List;
import java.util.SortedSet;
import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
@@ -341,6 +342,9 @@ public abstract class BaseIntegrationTest
/** Whether any test method in a class failed. **/
@Nonnull protected boolean testClassFailed;
+ /** IdP version determined from distribution name. **/
+ @Nullable protected String idpVersion;
+
/** Class logger. */
@Nonnull private final Logger log = LoggerFactory.getLogger(BaseIntegrationTest.class);
@@ -371,6 +375,14 @@ public abstract class BaseIntegrationTest
Assert.assertNotNull(pathToDistIdPHome, "Path to distribution idp.home not found");
Assert.assertTrue(pathToDistIdPHome.toAbsolutePath().toFile().exists(), "Path to dist idp.home not found");
+ // Determine IdP version from distribution name
+ final Pattern pattern = Pattern.compile("shibboleth-identity-provider-(.*)");
+ final Matcher matcher = pattern.matcher(pathToDistIdPHome.getFileName().toString());
+ if (matcher.find()) {
+ idpVersion = matcher.group(1);
+ log.debug("Testing IdP version '{}'", idpVersion);
+ }
+
// Path to per-test idp.home
final String timestamp = DateTimeFormatter.ofPattern(idpHomePattern).format(LocalDateTime.now());
pathToIdPHome = pathToDistIdPHome.getParent().resolve(timestamp);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list