aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lenz <thomas.lenz@egiz.gv.at>2019-09-11 07:06:36 +0200
committerThomas Lenz <thomas.lenz@egiz.gv.at>2019-09-11 07:06:36 +0200
commit322aaeb442d0d1e1744e60416aa4e434985dd36e (patch)
tree05663db1993aee4f0b47d025fb7dabbd5c9d8413
parent8417b6e54f200d424d3b0c5d5a89b161e6bfbede (diff)
downloadNational_eIDAS_Gateway-322aaeb442d0d1e1744e60416aa4e434985dd36e.tar.gz
National_eIDAS_Gateway-322aaeb442d0d1e1744e60416aa4e434985dd36e.tar.bz2
National_eIDAS_Gateway-322aaeb442d0d1e1744e60416aa4e434985dd36e.zip
fix broken jUnit test
-rw-r--r--basicConfig/default_config.properties4
-rw-r--r--eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/test/eidas/specific/modules/authmodule_eIDASv2/eIDASAttributePostProcessingTest.java14
2 files changed, 16 insertions, 2 deletions
diff --git a/basicConfig/default_config.properties b/basicConfig/default_config.properties
index 71de5b2b..df18c646 100644
--- a/basicConfig/default_config.properties
+++ b/basicConfig/default_config.properties
@@ -29,8 +29,8 @@ eidas.ms.auth.eIDAS.node_v2.workarounds.useRequestIdAsTransactionIdentifier=true
eidas.ms.auth.eIDAS.node_v2.loa.requested.minimum=http://eidas.europa.eu/LoA/high
eidas.ms.auth.eIDAS.szrclient.useTestService=true
-eidas.ms.auth.eIDAS.szrclient.endpoint.prod=
-eidas.ms.auth.eIDAS.szrclient.endpoint.test=
+eidas.ms.auth.eIDAS.szrclient.endpoint.prod=http://prodszr.test
+eidas.ms.auth.eIDAS.szrclient.endpoint.test=http://testszr.test
eidas.ms.auth.eIDAS.szrclient.ssl.keyStore.path=keys/.....
eidas.ms.auth.eIDAS.szrclient.ssl.keyStore.password=
eidas.ms.auth.eIDAS.szrclient.ssl.trustStore.path=
diff --git a/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/test/eidas/specific/modules/authmodule_eIDASv2/eIDASAttributePostProcessingTest.java b/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/test/eidas/specific/modules/authmodule_eIDASv2/eIDASAttributePostProcessingTest.java
index ed09ea2d..cd7895ba 100644
--- a/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/test/eidas/specific/modules/authmodule_eIDASv2/eIDASAttributePostProcessingTest.java
+++ b/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/test/eidas/specific/modules/authmodule_eIDASv2/eIDASAttributePostProcessingTest.java
@@ -24,11 +24,13 @@ package at.asitplus.test.eidas.specific.modules.authmodule_eIDASv2;
import static org.junit.Assert.fail;
+import java.io.File;
import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.Map;
import org.joda.time.DateTime;
+import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
@@ -43,6 +45,18 @@ import at.asitplus.eidas.specific.modules.authmodule_eIDASv2.service.EIDPostProc
@ContextConfiguration("/SpringTest-context_basic_test.xml")
public class eIDASAttributePostProcessingTest {
+ @BeforeClass
+ public static void classInitializer() throws Exception {
+ final String currentDir = new java.io.File( "." ).getCanonicalPath();
+ File configFile = new java.io.File(currentDir + "./../../basicConfig/default_config.properties");
+ if (!configFile.exists()) {
+ throw new Exception("Default Configuration not found. Test will will be FAIL");
+
+ }
+ System.setProperty("eidas.ms.configuration", configFile.toURI().toASCIIString());
+
+ }
+
@Autowired private EIDPostProcessingService postProcessor;
//lower case