use of com.thoughtworks.go.server.config.GoSSLConfig in project gocd by gocd.
the class GoSslSocketConnectorTest method setUp.
@Before
public void setUp() throws Exception {
keystore = folder.newFile("keystore");
truststore = folder.newFile("truststore");
GoSSLConfig cipherSuite = mock(GoSSLConfig.class);
String[] cipherSuitesToBeIncluded = { "FOO" };
when(cipherSuite.getCipherSuitesToBeIncluded()).thenReturn(cipherSuitesToBeIncluded);
SystemEnvironment systemEnvironment = mock(SystemEnvironment.class);
when(systemEnvironment.getSslServerPort()).thenReturn(1234);
when(systemEnvironment.keystore()).thenReturn(keystore);
when(systemEnvironment.truststore()).thenReturn(truststore);
when(systemEnvironment.get(SystemEnvironment.RESPONSE_BUFFER_SIZE)).thenReturn(100);
when(systemEnvironment.get(SystemEnvironment.IDLE_TIMEOUT)).thenReturn(200);
when(systemEnvironment.getListenHost()).thenReturn("foo");
Jetty9Server jettyServer = mock(Jetty9Server.class);
when(jettyServer.getServer()).thenReturn(new Server());
sslSocketConnector = new GoSslSocketConnector(jettyServer, "password", systemEnvironment, cipherSuite);
}
Aggregations