Search in sources :

Example 1 with GoSSLConfig

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);
}
Also used : SystemEnvironment(com.thoughtworks.go.util.SystemEnvironment) GoSSLConfig(com.thoughtworks.go.server.config.GoSSLConfig) Jetty9Server(com.thoughtworks.go.server.Jetty9Server) Jetty9Server(com.thoughtworks.go.server.Jetty9Server) Before(org.junit.Before)

Aggregations

Jetty9Server (com.thoughtworks.go.server.Jetty9Server)1 GoSSLConfig (com.thoughtworks.go.server.config.GoSSLConfig)1 SystemEnvironment (com.thoughtworks.go.util.SystemEnvironment)1 Before (org.junit.Before)1