From 83a10243f8cc5e39093f9764356350ae8c80e41c Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Fri, 19 Jun 2020 11:09:29 +0200 Subject: fix broken jUnit tests (update HSM-Facade certificates) --- .../gv/egiz/eaaf/core/test/http/HttpClientFactoryTest.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'eaaf_core_utils/src/test/java') diff --git a/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/test/http/HttpClientFactoryTest.java b/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/test/http/HttpClientFactoryTest.java index 510c6e47..433e6893 100644 --- a/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/test/http/HttpClientFactoryTest.java +++ b/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/test/http/HttpClientFactoryTest.java @@ -9,12 +9,6 @@ import java.security.KeyStoreException; import java.security.Provider; import java.security.cert.X509Certificate; -import at.gv.egiz.eaaf.core.exceptions.EaafException; -import at.gv.egiz.eaaf.core.impl.credential.EaafKeyStoreFactory; -import at.gv.egiz.eaaf.core.impl.data.Pair; -import at.gv.egiz.eaaf.core.impl.http.HttpClientConfiguration; -import at.gv.egiz.eaaf.core.impl.http.IHttpClientFactory; - import org.apache.commons.lang3.RandomStringUtils; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.methods.CloseableHttpResponse; @@ -28,9 +22,16 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.annotation.DirtiesContext; +import org.springframework.test.annotation.DirtiesContext.MethodMode; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import at.gv.egiz.eaaf.core.exceptions.EaafException; +import at.gv.egiz.eaaf.core.impl.credential.EaafKeyStoreFactory; +import at.gv.egiz.eaaf.core.impl.data.Pair; +import at.gv.egiz.eaaf.core.impl.http.HttpClientConfiguration; +import at.gv.egiz.eaaf.core.impl.http.IHttpClientFactory; import okhttp3.HttpUrl; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; @@ -536,6 +537,7 @@ public class HttpClientFactoryTest { } @Test + @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD) public void getCustomClientX509AuthWithHsmFacade() throws EaafException, ClientProtocolException, IOException, KeyStoreException { final HttpClientConfiguration clientConfig = new HttpClientConfiguration("jUnit-client"); -- cgit v1.2.3