diff --git a/modules/ingest-user-agent/src/test/java/org/opensearch/ingest/useragent/IngestUserAgentModulePluginTests.java b/modules/ingest-user-agent/src/test/java/org/opensearch/ingest/useragent/IngestUserAgentPluginTests.java similarity index 84% rename from modules/ingest-user-agent/src/test/java/org/opensearch/ingest/useragent/IngestUserAgentModulePluginTests.java rename to modules/ingest-user-agent/src/test/java/org/opensearch/ingest/useragent/IngestUserAgentPluginTests.java index 31fdafff1188a..febd98322934e 100644 --- a/modules/ingest-user-agent/src/test/java/org/opensearch/ingest/useragent/IngestUserAgentModulePluginTests.java +++ b/modules/ingest-user-agent/src/test/java/org/opensearch/ingest/useragent/IngestUserAgentPluginTests.java @@ -24,7 +24,7 @@ import java.util.List; import java.util.Set; -public class IngestUserAgentModulePluginTests extends OpenSearchTestCase { +public class IngestUserAgentPluginTests extends OpenSearchTestCase { private Settings.Builder settingsBuilder; @Before @@ -62,10 +62,10 @@ public void testAllowList() throws IOException { public void testInvalidAllowList() throws IOException { List invalidAllowList = List.of("set"); final Settings settings = settingsBuilder.putList( - IngestUserAgentModulePlugin.PROCESSORS_ALLOWLIST_SETTING.getKey(), + IngestUserAgentPlugin.PROCESSORS_ALLOWLIST_SETTING.getKey(), invalidAllowList ).build(); - try (IngestUserAgentModulePlugin plugin = new IngestUserAgentModulePlugin()) { + try (IngestUserAgentPlugin plugin = new IngestUserAgentPlugin()) { IllegalArgumentException e = expectThrows( IllegalArgumentException.class, () -> plugin.getProcessors(createParameters(settings)) @@ -74,7 +74,7 @@ public void testInvalidAllowList() throws IOException { "Processor(s) " + invalidAllowList + " were defined in [" - + IngestUserAgentModulePlugin.PROCESSORS_ALLOWLIST_SETTING.getKey() + + IngestUserAgentPlugin.PROCESSORS_ALLOWLIST_SETTING.getKey() + "] but do not exist", e.getMessage() ); @@ -82,17 +82,17 @@ public void testInvalidAllowList() throws IOException { } public void testAllowListNotSpecified() throws IOException { - settingsBuilder.remove(IngestUserAgentModulePlugin.PROCESSORS_ALLOWLIST_SETTING.getKey()); - try (IngestUserAgentModulePlugin plugin = new IngestUserAgentModulePlugin()) { + settingsBuilder.remove(IngestUserAgentPlugin.PROCESSORS_ALLOWLIST_SETTING.getKey()); + try (IngestUserAgentPlugin plugin = new IngestUserAgentPlugin()) { final Set expected = Set.of("user_agent"); assertEquals(expected, plugin.getProcessors(createParameters(settingsBuilder.build())).keySet()); } } private void runAllowListTest(List allowList) throws IOException { - final Settings settings = settingsBuilder.putList(IngestUserAgentModulePlugin.PROCESSORS_ALLOWLIST_SETTING.getKey(), allowList) + final Settings settings = settingsBuilder.putList(IngestUserAgentPlugin.PROCESSORS_ALLOWLIST_SETTING.getKey(), allowList) .build(); - try (IngestUserAgentModulePlugin plugin = new IngestUserAgentModulePlugin()) { + try (IngestUserAgentPlugin plugin = new IngestUserAgentPlugin()) { assertEquals(Set.copyOf(allowList), plugin.getProcessors(createParameters(settings)).keySet()); } }