You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by my...@apache.org on 2018/01/22 15:21:23 UTC
[fineract-cn-service-starter] 11/23: Adding key timestamp to
integration test environments.
This is an automated email from the ASF dual-hosted git repository.
myrle pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-service-starter.git
commit 756a09812127edb61dbe44ab9578e8d4dd0af813
Author: myrle-krantz <mk...@mifos.org>
AuthorDate: Thu Apr 13 11:40:21 2017 +0200
Adding key timestamp to integration test environments.
---
.../mifos/core/test/servicestarter/IntegrationTestEnvironment.java | 7 ++++++-
src/main/java/io/mifos/core/test/servicestarter/Microservice.java | 2 +-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/main/java/io/mifos/core/test/servicestarter/IntegrationTestEnvironment.java b/src/main/java/io/mifos/core/test/servicestarter/IntegrationTestEnvironment.java
index 685f01c..a9a7bb9 100644
--- a/src/main/java/io/mifos/core/test/servicestarter/IntegrationTestEnvironment.java
+++ b/src/main/java/io/mifos/core/test/servicestarter/IntegrationTestEnvironment.java
@@ -83,10 +83,11 @@ public class IntegrationTestEnvironment extends ExternalResource {
properties.setProperty(HYSTRIX_ENABLED_PROPERTY, HYSTRIX_ENABLED_DEFAULT);
properties.setProperty(RIBBON_USES_EUREKA_PROPERTY, RIBBON_USES_EUREKA_DEFAULT);
this.keyPairHolder = RsaKeyPairFactory.createKeyPair();
+ properties.setProperty(SYSTEM_PUBLIC_KEY_TIMESTAMP_PROPERTY, this.keyPairHolder.getTimestamp());
properties.setProperty(SYSTEM_PUBLIC_KEY_MODULUS_PROPERTY, this.keyPairHolder.publicKey().getModulus().toString());
properties.setProperty(SYSTEM_PUBLIC_KEY_EXPONENT_PROPERTY, this.keyPairHolder.publicKey().getPublicExponent().toString());
- this.systemSecurityEnvironment = new SystemSecurityEnvironment(keyPairHolder.publicKey(), keyPairHolder.privateKey());
+ this.systemSecurityEnvironment = new SystemSecurityEnvironment(keyPairHolder.getTimestamp(), keyPairHolder.publicKey(), keyPairHolder.privateKey());
this.dataStoreTenantInitializers = dataStoreTenantInitializers;
nextPort = 2020;
@@ -132,6 +133,10 @@ public class IntegrationTestEnvironment extends ExternalResource {
}
}
+ public String getSeshatKeyTimestamp() {
+ return this.keyPairHolder.getTimestamp();
+ }
+
public RSAPublicKey getSeshatPublicKey() {
return this.keyPairHolder.publicKey();
}
diff --git a/src/main/java/io/mifos/core/test/servicestarter/Microservice.java b/src/main/java/io/mifos/core/test/servicestarter/Microservice.java
index 58c5065..12dbb56 100644
--- a/src/main/java/io/mifos/core/test/servicestarter/Microservice.java
+++ b/src/main/java/io/mifos/core/test/servicestarter/Microservice.java
@@ -55,7 +55,7 @@ public class Microservice<T> extends ExternalResource {
applicationName = AnnotatedElementUtils.getMergedAnnotationAttributes(clazz, FeignClient.class).getString("value");
this.processEnvironment = new TestEnvironment(applicationName);
processEnvironment.setProperty(TestEnvironment.SERVER_PORT_PROPERTY, integrationTestEnvironment.getFreshPort().toString());
- processEnvironment.setKeyPair(integrationTestEnvironment.getSeshatPublicKey(), integrationTestEnvironment.getSeshatPrivateKey());
+ processEnvironment.setKeyPair(integrationTestEnvironment.getSeshatKeyTimestamp(), integrationTestEnvironment.getSeshatPublicKey(), integrationTestEnvironment.getSeshatPrivateKey());
//https://github.com/spring-cloud/spring-cloud-netflix/issues/373
//http://blog.abhijitsarkar.org/technical/netflix-eureka/
--
To stop receiving notification emails like this one, please contact
myrle@apache.org.