Class MapperScriptTestCase<FactoryType>

java.lang.Object
org.junit.Assert
org.apache.lucene.tests.util.LuceneTestCase
org.elasticsearch.test.ESTestCase
org.elasticsearch.index.mapper.MapperServiceTestCase
org.elasticsearch.index.mapper.MapperScriptTestCase<FactoryType>

public abstract class MapperScriptTestCase<FactoryType> extends MapperServiceTestCase
  • Constructor Details

    • MapperScriptTestCase

      public MapperScriptTestCase()
  • Method Details

    • type

      protected abstract String type()
    • serializableScript

      protected abstract FactoryType serializableScript()
    • errorThrowingScript

      protected abstract FactoryType errorThrowingScript()
    • singleValueScript

      protected abstract FactoryType singleValueScript()
    • multipleValuesScript

      protected abstract FactoryType multipleValuesScript()
    • script

      protected FactoryType script(String id)
    • compileScript

      protected <T> T compileScript(Script script, ScriptContext<T> context)
      Description copied from class: MapperServiceTestCase
      This is the injection point for tests that require mock scripts. Test cases should override this to return the mock script factory of their choice.
      Overrides:
      compileScript in class MapperServiceTestCase
    • testToXContent

      public void testToXContent() throws IOException
      Throws:
      IOException
    • testCannotIndexDirectlyIntoScriptMapper

      public void testCannotIndexDirectlyIntoScriptMapper() throws IOException
      Throws:
      IOException
    • testStoredScriptsNotPermitted

      public final void testStoredScriptsNotPermitted()
    • testIndexAndDocValuesFalseNotPermitted

      public final void testIndexAndDocValuesFalseNotPermitted()
    • testMultiFieldsNotPermitted

      public final void testMultiFieldsNotPermitted()
    • testCopyToNotPermitted

      public final void testCopyToNotPermitted()
    • testOnScriptErrorParameterRequiresScript

      public final void testOnScriptErrorParameterRequiresScript()
    • testOnScriptErrorContinue

      public final void testOnScriptErrorContinue() throws IOException
      Throws:
      IOException
    • testRejectScriptErrors

      public final void testRejectScriptErrors() throws IOException
      Throws:
      IOException
    • testMultipleValues

      public final void testMultipleValues() throws IOException
      Throws:
      IOException
    • assertMultipleValues

      protected abstract void assertMultipleValues(List<org.apache.lucene.index.IndexableField> fields)
    • testDocValuesDisabled

      public final void testDocValuesDisabled() throws IOException
      Throws:
      IOException
    • assertDocValuesDisabled

      protected abstract void assertDocValuesDisabled(List<org.apache.lucene.index.IndexableField> fields)
    • testIndexDisabled

      public final void testIndexDisabled() throws IOException
      Throws:
      IOException
    • assertIndexDisabled

      protected abstract void assertIndexDisabled(List<org.apache.lucene.index.IndexableField> fields)