Search in sources :

Example 1 with HTTPSourceConfig

use of com.amazon.dataprepper.plugins.source.loghttp.HTTPSourceConfig in project data-prepper by opensearch-project.

the class CertificateProviderFactoryTest method getFileCertificateProviderSuccess.

@Test
public void getFileCertificateProviderSuccess() {
    final HTTPSourceConfig sourceConfig = mock(HTTPSourceConfig.class);
    when(sourceConfig.isSsl()).thenReturn(true);
    when(sourceConfig.getSslCertificateFile()).thenReturn(TEST_SSL_CERTIFICATE_FILE);
    when(sourceConfig.getSslKeyFile()).thenReturn(TEST_SSL_KEY_FILE);
    final CertificateProviderFactory certificateProviderFactory = new CertificateProviderFactory(sourceConfig);
    final CertificateProvider certificateProvider = certificateProviderFactory.getCertificateProvider();
    assertThat(certificateProvider, IsInstanceOf.instanceOf(FileCertificateProvider.class));
}
Also used : HTTPSourceConfig(com.amazon.dataprepper.plugins.source.loghttp.HTTPSourceConfig) FileCertificateProvider(com.amazon.dataprepper.plugins.certificate.file.FileCertificateProvider) FileCertificateProvider(com.amazon.dataprepper.plugins.certificate.file.FileCertificateProvider) CertificateProvider(com.amazon.dataprepper.plugins.certificate.CertificateProvider) Test(org.junit.jupiter.api.Test)

Aggregations

CertificateProvider (com.amazon.dataprepper.plugins.certificate.CertificateProvider)1 FileCertificateProvider (com.amazon.dataprepper.plugins.certificate.file.FileCertificateProvider)1 HTTPSourceConfig (com.amazon.dataprepper.plugins.source.loghttp.HTTPSourceConfig)1 Test (org.junit.jupiter.api.Test)1