Skip to content

Commit 919f533

Browse files
author
Tomas Longo
committed
Remove tests
Signed-off-by: Tomas Longo <tomas.longo@sap.com>
1 parent 2afdc4b commit 919f533

1 file changed

Lines changed: 0 additions & 60 deletions

File tree

  • data-prepper-plugins/otel-trace-source/src/test/java/org/opensearch/dataprepper/plugins/source/oteltrace

data-prepper-plugins/otel-trace-source/src/test/java/org/opensearch/dataprepper/plugins/source/oteltrace/OTelTraceSourceTest.java

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -606,66 +606,6 @@ void testOptionalHttpAuthServiceNotInPlace() {
606606
verify(serverBuilder, never()).decorator(isA(Function.class));
607607
}
608608

609-
@Test
610-
@Disabled
611-
void testOptionalHttpAuthServiOceInPlace() {
612-
final Optional<Function<? super HttpService, ? extends HttpService>> function = Optional.of(httpService -> httpService);
613-
614-
final Map<String, Object> settingsMap = new HashMap<>();
615-
// todo tlongo: Providing this pipeline config to data prepper let's it refuse to boot right away. Why is this test green, then?
616-
// Because the it's the plugin factory that stumbles over the missing plugin settings. But, the plugin factory is
617-
// mocked in this whole test class, always returning a GrpcBasicAuthenticationProvider. IMO this test does not
618-
// service its purpose
619-
settingsMap.put("authentication", new PluginModel("test", null));
620-
settingsMap.put("unauthenticated_health_check", true);
621-
622-
settingsMap.put(SSL, false);
623-
624-
testPluginSetting = new PluginSetting(null, settingsMap);
625-
testPluginSetting.setPipelineName("pipeline");
626-
oTelTraceSourceConfig = OBJECT_MAPPER.convertValue(testPluginSetting.getSettings(), OTelTraceSourceConfig.class);
627-
628-
when(authenticationProvider.getHttpAuthenticationService()).thenReturn(function);
629-
630-
final OTelTraceSource source = new OTelTraceSource(oTelTraceSourceConfig, pluginMetrics, pluginFactory, certificateProviderFactory, pipelineDescription);
631-
632-
try (final MockedStatic<Server> armeriaServerMock = Mockito.mockStatic(Server.class)) {
633-
armeriaServerMock.when(Server::builder).thenReturn(serverBuilder);
634-
source.start(buffer);
635-
}
636-
637-
verify(serverBuilder).service(isA(GrpcService.class));
638-
verify(serverBuilder).decorator(isA(String.class), isA(Function.class));
639-
}
640-
641-
@Test
642-
@Disabled // todo tlongo see testOptionalHttpAuthServiOceInPlace on why I disabled this test
643-
void testOptionalHttpAuthServiceInPlaceWithUnauthenticatedDisabled() {
644-
final Optional<Function<? super HttpService, ? extends HttpService>> function = Optional.of(httpService -> httpService);
645-
646-
final Map<String, Object> settingsMap = new HashMap<>();
647-
settingsMap.put("authentication", new PluginModel("test", null));
648-
settingsMap.put("unauthenticated_health_check", false);
649-
650-
settingsMap.put(SSL, false);
651-
652-
testPluginSetting = new PluginSetting(null, settingsMap);
653-
testPluginSetting.setPipelineName("pipeline");
654-
oTelTraceSourceConfig = OBJECT_MAPPER.convertValue(testPluginSetting.getSettings(), OTelTraceSourceConfig.class);
655-
656-
when(authenticationProvider.getHttpAuthenticationService()).thenReturn(function);
657-
658-
final OTelTraceSource source = new OTelTraceSource(oTelTraceSourceConfig, pluginMetrics, pluginFactory, certificateProviderFactory, pipelineDescription);
659-
660-
try (final MockedStatic<Server> armeriaServerMock = Mockito.mockStatic(Server.class)) {
661-
armeriaServerMock.when(Server::builder).thenReturn(serverBuilder);
662-
source.start(buffer);
663-
}
664-
665-
verify(serverBuilder).service(isA(GrpcService.class));
666-
verify(serverBuilder).decorator(isA(Function.class));
667-
}
668-
669609
@Test
670610
void testDoubleStart() {
671611
// starting server

0 commit comments

Comments
 (0)