use of ee.ria.xroad.proxy.testsuite.TestSuiteGlobalConf in project X-Road by nordic-institute.
the class SslSelectFastestProxy method startUp.
@Override
protected void startUp() throws Exception {
super.startUp();
GlobalConf.reload(new TestSuiteGlobalConf() {
@Override
public Collection<String> getProviderAddress(ClientId provider) {
return Arrays.asList("127.0.0.5", "localhost", "server.invalid.", "127.0.0,1");
}
});
}
use of ee.ria.xroad.proxy.testsuite.TestSuiteGlobalConf in project X-Road by nordic-institute.
the class SslAuthTrustManagerError method startUp.
@Override
protected void startUp() throws Exception {
ServerConf.reload(new TestSuiteServerConf());
GlobalConf.reload(new TestSuiteGlobalConf() {
@Override
public SecurityServerId getServerId(X509Certificate cert) {
return null;
}
});
}
use of ee.ria.xroad.proxy.testsuite.TestSuiteGlobalConf in project X-Road by nordic-institute.
the class MetadataServiceHandlerTest method init.
/**
* Init data for tests
*/
@Before
public void init() throws IOException {
GlobalConf.reload(new TestSuiteGlobalConf());
KeyConf.reload(new TestSuiteKeyConf());
ServerConf.reload(new TestSuiteServerConf());
httpClientMock = mock(HttpClient.class);
mockRequest = mock(HttpServletRequest.class);
mockResponse = mock(HttpServletResponse.class);
mockServletOutputStream = new MetaserviceTestUtil.StubServletOutputStream();
when(mockResponse.getOutputStream()).thenReturn(mockServletOutputStream);
mockProxyMessage = mock(ProxyMessage.class);
when(mockProxyMessage.getSoapContentType()).thenReturn(MimeTypes.TEXT_XML_UTF8);
this.mockServer = new WireMockServer(options().port(WSDL_SERVER_PORT));
}
use of ee.ria.xroad.proxy.testsuite.TestSuiteGlobalConf in project X-Road by nordic-institute.
the class ProxyMonitorServiceHandlerMetricsTest method init.
/**
* Init data for tests
*/
@Before
public void init() throws IOException {
GlobalConf.reload(new TestSuiteGlobalConf() {
@Override
public String getInstanceIdentifier() {
return EXPECTED_XR_INSTANCE;
}
});
KeyConf.reload(new TestSuiteKeyConf());
ServerConf.reload(new TestSuiteServerConf() {
@Override
public SecurityServerId getIdentifier() {
return DEFAULT_OWNER_SERVER;
}
});
mockRequest = mock(HttpServletRequest.class);
mockProxyMessage = mock(ProxyMessage.class);
when(mockProxyMessage.getSoapContentType()).thenReturn(MimeTypes.TEXT_XML_UTF8);
}
use of ee.ria.xroad.proxy.testsuite.TestSuiteGlobalConf in project X-Road by nordic-institute.
the class SecurityServerMetricsMessage method startUp.
@Override
protected void startUp() throws Exception {
super.startUp();
GlobalConf.reload(new TestSuiteGlobalConf() {
@Override
public String getInstanceIdentifier() {
return EXPECTED_XR_INSTANCE;
}
});
KeyConf.reload(new TestSuiteKeyConf());
ServerConf.reload(new TestSuiteServerConf() {
@Override
public SecurityServerId getIdentifier() {
return DEFAULT_OWNER_SERVER;
}
});
unmarshaller = JAXBContext.newInstance(GetSecurityServerMetricsResponse.class).createUnmarshaller();
ACTOR_SYSTEM.actorOf(Props.create(MockMetricsProvider.class), "MetricsProviderActor");
}
Aggregations