Search in sources :

Example 31 with PluginModel

use of com.amazon.dataprepper.model.configuration.PluginModel in project data-prepper by opensearch-project.

the class LogstashPluginMapperTest method mapPlugin_should_return_PluginModel_with_correct_pluginName.

@Test
void mapPlugin_should_return_PluginModel_with_correct_pluginName() {
    final LogstashPlugin logstashPlugin = mock(LogstashPlugin.class);
    when(logstashPlugin.getPluginName()).thenReturn("amazon_es");
    final List<PluginModel> pluginModels = createObjectUnderTest().mapPlugin(logstashPlugin);
    assertThat(pluginModels, notNullValue());
    assertThat(pluginModels.get(0).getPluginName(), equalTo("opensearch"));
}
Also used : PluginModel(com.amazon.dataprepper.model.configuration.PluginModel) LogstashPlugin(org.opensearch.dataprepper.logstash.model.LogstashPlugin) Test(org.junit.jupiter.api.Test)

Aggregations

PluginModel (com.amazon.dataprepper.model.configuration.PluginModel)31 Test (org.junit.jupiter.api.Test)21 LogstashAttribute (org.opensearch.dataprepper.logstash.model.LogstashAttribute)17 List (java.util.List)8 ArrayList (java.util.ArrayList)6 PluginSetting (com.amazon.dataprepper.model.configuration.PluginSetting)5 DateProcessorConfig (com.amazon.dataprepper.plugins.processor.date.DateProcessorConfig)5 HashMap (java.util.HashMap)5 LogstashAttributeValue (org.opensearch.dataprepper.logstash.model.LogstashAttributeValue)5 LinkedList (java.util.LinkedList)3 Map (java.util.Map)3 LogstashPlugin (org.opensearch.dataprepper.logstash.model.LogstashPlugin)3 DataPrepperConfiguration (com.amazon.dataprepper.parser.model.DataPrepperConfiguration)2 Objects (java.util.Objects)2 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)2 LogstashMappingException (org.opensearch.dataprepper.logstash.exception.LogstashMappingException)2 PipelineModel (com.amazon.dataprepper.model.configuration.PipelineModel)1 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1 Collection (java.util.Collection)1