diff options
author | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2021-01-07 10:41:59 +0100 |
---|---|---|
committer | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2021-01-07 10:41:59 +0100 |
commit | b4e9b8810eb3020b7a013d323974f2de99de9b77 (patch) | |
tree | 7cd757f6bcfe41c030cd1461fefb0e47b5b9e73a /eidas_modules/authmodule-eIDAS-v2/src/test | |
parent | d9c6a5c8bf3cab0311fc25b38b308b22ec852a3e (diff) | |
download | National_eIDAS_Gateway-b4e9b8810eb3020b7a013d323974f2de99de9b77.tar.gz National_eIDAS_Gateway-b4e9b8810eb3020b7a013d323974f2de99de9b77.tar.bz2 National_eIDAS_Gateway-b4e9b8810eb3020b7a013d323974f2de99de9b77.zip |
update jUnit test that implements communication with real SZR service
Diffstat (limited to 'eidas_modules/authmodule-eIDAS-v2/src/test')
2 files changed, 23 insertions, 2 deletions
diff --git a/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/SzrClientTestProduction.java b/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/SzrClientTestProduction.java index f9a134a6..0feb5106 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/SzrClientTestProduction.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/SzrClientTestProduction.java @@ -30,13 +30,16 @@ import java.security.NoSuchProviderException; import java.util.List; import org.apache.commons.lang3.StringUtils; +import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.annotation.IfProfileValue; import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.util.Base64Utils; import org.w3c.dom.Element; @@ -59,11 +62,16 @@ import szrservices.PersonInfoType; import szrservices.SZRException_Exception; import szrservices.TravelDocumentType; -@Ignore + +@IfProfileValue(name = "spring.profiles.active", value = "devEnvironment") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = { "/SpringTest-context_tasks_test.xml", "/SpringTest-context_basic_realConfig.xml"}) +@TestPropertySource(locations = { + //"classpath:/application.properties", + "file:/home/tlenz/Projekte/config/ms_connector/default_config.properties", + }) public class SzrClientTestProduction { private static final Logger log = LoggerFactory.getLogger(SzrClientTestProduction.class); @@ -86,6 +94,14 @@ public class SzrClientTestProduction { } @Test + public void getVsz() throws SzrCommunicationException, EidasSAuthenticationException { + String vsz = szrClient.getEncryptedStammzahl(getPersonInfo()); + Assert.assertNotNull("vsz", vsz); + + } + + + @Test public void getIdentityLinkRawMode() throws SZRException_Exception, EaafParserException, NoSuchProviderException, IOException, InvalidKeyException, EidasSAuthenticationException { log.debug("Starting connecting SZR Gateway"); diff --git a/eidas_modules/authmodule-eIDAS-v2/src/test/resources/SpringTest-context_basic_realConfig.xml b/eidas_modules/authmodule-eIDAS-v2/src/test/resources/SpringTest-context_basic_realConfig.xml index bcca90b5..d4474056 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/test/resources/SpringTest-context_basic_realConfig.xml +++ b/eidas_modules/authmodule-eIDAS-v2/src/test/resources/SpringTest-context_basic_realConfig.xml @@ -10,11 +10,16 @@ http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd"> <context:annotation-config /> - + + <!-- <bean id="BasicMSSpecificNodeConfig" class="at.asitplus.eidas.specific.connector.config.BasicConfigurationProvider"> <constructor-arg value="#{systemProperties['eidas.ms.configuration']}" /> </bean> + --> + + <bean id="springBootBasicConfingProvider" + class="at.asitplus.eidas.specific.connector.config.SpringBootBasicConfigurationProvider" /> </beans>
\ No newline at end of file |