Class BuildUtils

java.lang.Object
org.elasticsearch.test.BuildUtils

public class BuildUtils extends Object
Utilities for copying and mutating Build instances in tests.
  • Constructor Details

    • BuildUtils

      public BuildUtils()
  • Method Details

    • newBuild

      public static Build newBuild(Build existing, Map<String,Object> extraArgs)
      Creates a new Build instance, using and existing build instance as a template.
      Parameters:
      existing - A Build instance which will be copied
      extraArgs - A map of arguments to the Build constructor which will override values in the existing instance
      Returns:
      A new Build instance
    • mutateBuild

      public static Build mutateBuild(Build existing)
      Creates a random mutation of the given Build instance. The existing build instance is copied with a single field randomly changed. The value for the field is randomized.
      Parameters:
      existing - The existing instance to mutate
      Returns:
      A new Build instance