From 63f6c6db8596adc71b12e6ec1961b1dc30e000ff Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Thu, 29 Oct 2015 23:25:24 -0700 Subject: [PATCH] Build: Move test framework files to their new location The test jar was previously built in maven by copying class files. With gradle we now have a proper test framework artifact. This change moves the classes used by the test framework into the test-framework module. See #13930 --- core/build.gradle | 17 +--- test-framework/build.gradle | 81 +++++++------------ .../bootstrap/BootstrapForTesting.java | 0 .../cache/recycler/MockPageCacheRecycler.java | 0 .../MockInternalClusterInfoService.java | 0 .../cluster/routing/TestShardRouting.java | 0 .../common/cli/CliToolTestCase.java | 0 .../common/io/PathUtilsForTesting.java | 0 .../common/util/MockBigArrays.java | 0 .../index/MockEngineFactoryPlugin.java | 0 .../java/org/elasticsearch/node/MockNode.java | 0 .../elasticsearch/node/NodeMocksPlugin.java | 0 .../percolator/PercolatorTestUtil.java | 0 .../search/MockSearchService.java | 0 .../bucket/AbstractTermsTestCase.java | 0 ...NativeSignificanceScoreScriptNoParams.java | 0 ...tiveSignificanceScoreScriptWithParams.java | 0 .../bucket/script/TestScript.java | 0 .../metrics/AbstractNumericTestCase.java | 0 .../elasticsearch/test/BackgroundIndexer.java | 0 .../test/CompositeTestCluster.java | 0 .../elasticsearch/test/CorruptionUtils.java | 0 .../elasticsearch/test/DummyShardLock.java | 0 .../test/ESAllocationTestCase.java | 0 .../test/ESBackcompatTestCase.java | 0 .../elasticsearch/test/ESIntegTestCase.java | 0 .../test/ESSingleNodeTestCase.java | 0 .../org/elasticsearch/test/ESTestCase.java | 0 .../test/ESTokenStreamTestCase.java | 0 .../org/elasticsearch/test/ExternalNode.java | 0 .../test/ExternalTestCluster.java | 0 .../test/IndexSettingsModule.java | 0 .../test/InternalTestCluster.java | 0 .../test/MockIndexEventListener.java | 0 .../test/NodeConfigurationSource.java | 0 .../org/elasticsearch/test/StreamsUtils.java | 0 .../org/elasticsearch/test/TestCluster.java | 0 .../elasticsearch/test/TestSearchContext.java | 0 .../org/elasticsearch/test/VersionUtils.java | 0 .../elasticsearch/test/XContentTestUtils.java | 0 .../test/client/RandomizingClient.java | 0 .../test/cluster/NoopClusterService.java | 0 .../test/cluster/TestClusterService.java | 0 .../ClusterDiscoveryConfiguration.java | 0 .../BlockClusterStateProcessing.java | 0 .../IntermittentLongGCDisruption.java | 0 .../test/disruption/LongGCDisruption.java | 0 .../disruption/NetworkDelaysPartition.java | 0 .../NetworkDisconnectPartition.java | 0 .../test/disruption/NetworkPartition.java | 0 .../test/disruption/NetworkPartitionIT.java | 0 .../NetworkUnresponsivePartition.java | 0 .../test/disruption/NoOpDisruptionScheme.java | 0 .../disruption/ServiceDisruptionScheme.java | 0 .../test/disruption/SingleNodeDisruption.java | 0 .../SlowClusterStateProcessing.java | 0 .../test/engine/AssertingSearcher.java | 0 .../test/engine/MockEngineFactory.java | 0 .../test/engine/MockEngineSupport.java | 0 .../test/engine/MockEngineSupportModule.java | 0 .../test/engine/MockInternalEngine.java | 0 .../test/engine/MockShadowEngine.java | 0 .../engine/ThrowingLeafReaderWrapper.java | 0 .../test/gateway/NoopGatewayAllocator.java | 0 .../test/hamcrest/CollectionAssertions.java | 0 .../test/hamcrest/CollectionMatchers.java | 0 .../hamcrest/ElasticsearchAssertions.java | 0 .../test/hamcrest/ElasticsearchMatchers.java | 0 .../test/hamcrest/RegexMatcher.java | 0 .../test/junit/annotations/Network.java | 0 .../test/junit/annotations/TestLogging.java | 0 .../test/junit/listeners/LoggingListener.java | 0 .../junit/listeners/ReproduceInfoPrinter.java | 0 .../junit/rule/RepeatOnExceptionRule.java | 0 .../test/rest/ESRestTestCase.java | 0 .../test/rest/FakeRestRequest.java | 0 .../org/elasticsearch/test/rest/Rest0IT.java | 0 .../org/elasticsearch/test/rest/Rest1IT.java | 0 .../org/elasticsearch/test/rest/Rest2IT.java | 0 .../org/elasticsearch/test/rest/Rest3IT.java | 0 .../org/elasticsearch/test/rest/Rest4IT.java | 0 .../org/elasticsearch/test/rest/Rest5IT.java | 0 .../org/elasticsearch/test/rest/Rest6IT.java | 0 .../org/elasticsearch/test/rest/Rest7IT.java | 0 .../test/rest/RestTestCandidate.java | 0 .../test/rest/RestTestExecutionContext.java | 0 .../org/elasticsearch/test/rest/Stash.java | 0 .../test/rest/client/RestClient.java | 0 .../test/rest/client/RestException.java | 0 .../test/rest/client/RestPath.java | 0 .../test/rest/client/RestResponse.java | 0 .../client/http/HttpDeleteWithEntity.java | 0 .../rest/client/http/HttpGetWithEntity.java | 0 .../rest/client/http/HttpRequestBuilder.java | 0 .../test/rest/client/http/HttpResponse.java | 0 .../test/rest/json/JsonPath.java | 0 .../test/rest/parser/DoSectionParser.java | 0 .../rest/parser/GreaterThanEqualToParser.java | 0 .../test/rest/parser/GreaterThanParser.java | 0 .../test/rest/parser/IsFalseParser.java | 0 .../test/rest/parser/IsTrueParser.java | 0 .../test/rest/parser/LengthParser.java | 0 .../rest/parser/LessThanOrEqualToParser.java | 0 .../test/rest/parser/LessThanParser.java | 0 .../test/rest/parser/MatchParser.java | 0 .../rest/parser/RestTestFragmentParser.java | 0 .../rest/parser/RestTestParseException.java | 0 .../rest/parser/RestTestSectionParser.java | 0 .../parser/RestTestSuiteParseContext.java | 0 .../test/rest/parser/RestTestSuiteParser.java | 0 .../test/rest/parser/SetSectionParser.java | 0 .../test/rest/parser/SetupSectionParser.java | 0 .../test/rest/parser/SkipSectionParser.java | 0 .../test/rest/section/ApiCallSection.java | 0 .../test/rest/section/Assertion.java | 0 .../test/rest/section/DoSection.java | 0 .../test/rest/section/ExecutableSection.java | 0 .../rest/section/GreaterThanAssertion.java | 0 .../section/GreaterThanEqualToAssertion.java | 0 .../test/rest/section/IsFalseAssertion.java | 0 .../test/rest/section/IsTrueAssertion.java | 0 .../test/rest/section/LengthAssertion.java | 0 .../test/rest/section/LessThanAssertion.java | 0 .../section/LessThanOrEqualToAssertion.java | 0 .../test/rest/section/MatchAssertion.java | 0 .../test/rest/section/RestTestSuite.java | 0 .../test/rest/section/SetSection.java | 0 .../test/rest/section/SetupSection.java | 0 .../test/rest/section/SkipSection.java | 0 .../test/rest/section/TestSection.java | 0 .../elasticsearch/test/rest/spec/RestApi.java | 0 .../test/rest/spec/RestApiParser.java | 0 .../test/rest/spec/RestSpec.java | 0 .../test/rest/support/Features.java | 0 .../test/rest/support/FileUtils.java | 0 .../test/store/MockFSDirectoryService.java | 0 .../test/store/MockFSIndexStore.java | 0 .../transport/AssertingLocalTransport.java | 0 .../test/transport/CapturingTransport.java | 0 .../test/transport/MockTransportService.java | 0 .../src/main}/resources/log4j.properties | 0 .../rest/test/AbstractParserTestCase.java | 0 .../test/rest/test/AssertionParsersTests.java | 0 .../test/rest/test/DoSectionParserTests.java | 0 .../test/rest/test/FileUtilsTests.java | 40 ++++----- .../test/rest/test/JsonPathTests.java | 0 .../rest/test/RestApiParserFailingTests.java | 0 .../test/rest/test/RestApiParserTests.java | 0 .../test/rest/test/RestTestParserTests.java | 0 .../test/rest/test/SetSectionParserTests.java | 0 .../rest/test/SetupSectionParserTests.java | 0 .../rest/test/SkipSectionParserTests.java | 0 .../rest/test/TestSectionParserTests.java | 0 .../test/test/InternalTestClusterTests.java | 0 .../test/test/LoggingListenerTests.java | 0 .../test/test/SuiteScopeClusterIT.java | 0 .../test/test/TestScopeClusterIT.java | 0 .../test/test/VersionUtilsTests.java | 0 .../rest-api-spec/test/suite1/10_basic.yaml | 31 +++++++ .../test/suite1/20_another_test.yaml | 21 +++++ .../rest-api-spec/test/suite2/10_basic.yaml | 26 ++++++ .../rest-api-spec/test/suite2/15_test2.yaml | 26 ++++++ 162 files changed, 157 insertions(+), 85 deletions(-) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/bootstrap/BootstrapForTesting.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/cache/recycler/MockPageCacheRecycler.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/cluster/MockInternalClusterInfoService.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/cluster/routing/TestShardRouting.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/common/cli/CliToolTestCase.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/common/io/PathUtilsForTesting.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/common/util/MockBigArrays.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/index/MockEngineFactoryPlugin.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/node/MockNode.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/node/NodeMocksPlugin.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/percolator/PercolatorTestUtil.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/search/MockSearchService.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/search/aggregations/bucket/AbstractTermsTestCase.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/search/aggregations/bucket/script/NativeSignificanceScoreScriptNoParams.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/search/aggregations/bucket/script/NativeSignificanceScoreScriptWithParams.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/search/aggregations/bucket/script/TestScript.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/search/aggregations/metrics/AbstractNumericTestCase.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/BackgroundIndexer.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/CompositeTestCluster.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/CorruptionUtils.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/DummyShardLock.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/ESAllocationTestCase.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/ESBackcompatTestCase.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/ESIntegTestCase.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/ESSingleNodeTestCase.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/ESTestCase.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/ESTokenStreamTestCase.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/ExternalNode.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/ExternalTestCluster.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/IndexSettingsModule.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/InternalTestCluster.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/MockIndexEventListener.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/NodeConfigurationSource.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/StreamsUtils.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/TestCluster.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/TestSearchContext.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/VersionUtils.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/XContentTestUtils.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/client/RandomizingClient.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/cluster/NoopClusterService.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/cluster/TestClusterService.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/discovery/ClusterDiscoveryConfiguration.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/disruption/BlockClusterStateProcessing.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/disruption/IntermittentLongGCDisruption.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/disruption/LongGCDisruption.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/disruption/NetworkDelaysPartition.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/disruption/NetworkDisconnectPartition.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/disruption/NetworkPartition.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/disruption/NetworkPartitionIT.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/disruption/NetworkUnresponsivePartition.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/disruption/NoOpDisruptionScheme.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/disruption/ServiceDisruptionScheme.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/disruption/SingleNodeDisruption.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/disruption/SlowClusterStateProcessing.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/engine/AssertingSearcher.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/engine/MockEngineFactory.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/engine/MockEngineSupport.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/engine/MockEngineSupportModule.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/engine/MockInternalEngine.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/engine/MockShadowEngine.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/engine/ThrowingLeafReaderWrapper.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/gateway/NoopGatewayAllocator.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/hamcrest/CollectionAssertions.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/hamcrest/CollectionMatchers.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/hamcrest/ElasticsearchMatchers.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/hamcrest/RegexMatcher.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/junit/annotations/Network.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/junit/annotations/TestLogging.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/junit/listeners/LoggingListener.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/junit/listeners/ReproduceInfoPrinter.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/junit/rule/RepeatOnExceptionRule.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/ESRestTestCase.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/FakeRestRequest.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/Rest0IT.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/Rest1IT.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/Rest2IT.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/Rest3IT.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/Rest4IT.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/Rest5IT.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/Rest6IT.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/Rest7IT.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/RestTestCandidate.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/RestTestExecutionContext.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/Stash.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/client/RestClient.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/client/RestException.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/client/RestPath.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/client/RestResponse.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/client/http/HttpDeleteWithEntity.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/client/http/HttpGetWithEntity.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/client/http/HttpRequestBuilder.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/client/http/HttpResponse.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/json/JsonPath.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/parser/DoSectionParser.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/parser/GreaterThanEqualToParser.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/parser/GreaterThanParser.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/parser/IsFalseParser.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/parser/IsTrueParser.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/parser/LengthParser.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/parser/LessThanOrEqualToParser.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/parser/LessThanParser.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/parser/MatchParser.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/parser/RestTestFragmentParser.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/parser/RestTestParseException.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/parser/RestTestSectionParser.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/parser/RestTestSuiteParseContext.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/parser/RestTestSuiteParser.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/parser/SetSectionParser.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/parser/SetupSectionParser.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/parser/SkipSectionParser.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/section/ApiCallSection.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/section/Assertion.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/section/DoSection.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/section/ExecutableSection.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/section/GreaterThanAssertion.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/section/GreaterThanEqualToAssertion.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/section/IsFalseAssertion.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/section/IsTrueAssertion.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/section/LengthAssertion.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/section/LessThanAssertion.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/section/LessThanOrEqualToAssertion.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/section/MatchAssertion.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/section/RestTestSuite.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/section/SetSection.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/section/SetupSection.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/section/SkipSection.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/section/TestSection.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/spec/RestApi.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/spec/RestApiParser.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/spec/RestSpec.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/support/Features.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/rest/support/FileUtils.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/store/MockFSDirectoryService.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/store/MockFSIndexStore.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/transport/AssertingLocalTransport.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/transport/CapturingTransport.java (100%) rename {core/src/test => test-framework/src/main}/java/org/elasticsearch/test/transport/MockTransportService.java (100%) rename {core/src/test => test-framework/src/main}/resources/log4j.properties (100%) rename {core => test-framework}/src/test/java/org/elasticsearch/test/rest/test/AbstractParserTestCase.java (100%) rename {core => test-framework}/src/test/java/org/elasticsearch/test/rest/test/AssertionParsersTests.java (100%) rename {core => test-framework}/src/test/java/org/elasticsearch/test/rest/test/DoSectionParserTests.java (100%) rename {core => test-framework}/src/test/java/org/elasticsearch/test/rest/test/FileUtilsTests.java (77%) rename {core => test-framework}/src/test/java/org/elasticsearch/test/rest/test/JsonPathTests.java (100%) rename {core => test-framework}/src/test/java/org/elasticsearch/test/rest/test/RestApiParserFailingTests.java (100%) rename {core => test-framework}/src/test/java/org/elasticsearch/test/rest/test/RestApiParserTests.java (100%) rename {core => test-framework}/src/test/java/org/elasticsearch/test/rest/test/RestTestParserTests.java (100%) rename {core => test-framework}/src/test/java/org/elasticsearch/test/rest/test/SetSectionParserTests.java (100%) rename {core => test-framework}/src/test/java/org/elasticsearch/test/rest/test/SetupSectionParserTests.java (100%) rename {core => test-framework}/src/test/java/org/elasticsearch/test/rest/test/SkipSectionParserTests.java (100%) rename {core => test-framework}/src/test/java/org/elasticsearch/test/rest/test/TestSectionParserTests.java (100%) rename {core => test-framework}/src/test/java/org/elasticsearch/test/test/InternalTestClusterTests.java (100%) rename {core => test-framework}/src/test/java/org/elasticsearch/test/test/LoggingListenerTests.java (100%) rename {core => test-framework}/src/test/java/org/elasticsearch/test/test/SuiteScopeClusterIT.java (100%) rename {core => test-framework}/src/test/java/org/elasticsearch/test/test/TestScopeClusterIT.java (100%) rename {core => test-framework}/src/test/java/org/elasticsearch/test/test/VersionUtilsTests.java (100%) create mode 100644 test-framework/src/test/resources/rest-api-spec/test/suite1/10_basic.yaml create mode 100644 test-framework/src/test/resources/rest-api-spec/test/suite1/20_another_test.yaml create mode 100644 test-framework/src/test/resources/rest-api-spec/test/suite2/10_basic.yaml create mode 100644 test-framework/src/test/resources/rest-api-spec/test/suite2/15_test2.yaml diff --git a/core/build.gradle b/core/build.gradle index 733f4286086..3bc0168e077 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -89,20 +89,10 @@ dependencies { compile 'net.java.dev.jna:jna:4.1.0', optional - // TODO: remove these test deps and just depend on test-framework - testCompile(group: 'junit', name: 'junit', version: '4.11') { - transitive = false + testCompile("org.elasticsearch:test-framework:${version}") { + // tests use the locally compiled version of core + exclude group: 'org.elasticsearch', module: 'elasticsearch' } - testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}" - - testCompile("org.apache.lucene:lucene-test-framework:${versions.lucene}") { - exclude group: 'com.carrotsearch.randomizedtesting', module: 'junit4-ant' - } - testCompile(group: 'org.hamcrest', name: 'hamcrest-all', version: '1.3') { - exclude group: 'org.hamcrest', module: 'hamcrest-core' - } - testCompile 'com.google.jimfs:jimfs:1.0' - testCompile "org.apache.httpcomponents:httpclient:${versions.httpclient}" } compileJava.options.compilerArgs << "-Xlint:-cast,-deprecation,-fallthrough,-overrides,-rawtypes,-serial,-try,-unchecked" @@ -129,5 +119,4 @@ integTest.mustRunAfter test RestSpecHack.configureDependencies(project) Task copyRestSpec = RestSpecHack.configureTask(project, true) integTest.dependsOn copyRestSpec -test.dependsOn copyRestSpec diff --git a/test-framework/build.gradle b/test-framework/build.gradle index 2174e934c1a..b4f4411d27b 100644 --- a/test-framework/build.gradle +++ b/test-framework/build.gradle @@ -1,69 +1,48 @@ +/* + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import org.elasticsearch.gradle.precommit.PrecommitTasks -apply plugin: 'java' +apply plugin: 'elasticsearch.build' apply plugin: 'com.bmuschko.nexus' dependencies { - // TODO: change to elasticsearch core jar dep, and use dependnecy subs to point at core project compile "org.elasticsearch:elasticsearch:${version}" - + compile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}" compile(group: 'junit', name: 'junit', version: '4.11') { exclude group: 'org.hamcrest', module: 'hamcrest-core' } - compile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}" - compile("org.apache.lucene:lucene-test-framework:${versions.lucene}") { exclude group: 'com.carrotsearch.randomizedtesting', module: 'junit4-ant' } - compile(group: 'org.hamcrest', name: 'hamcrest-all', version: '1.3') { + compile('org.hamcrest:hamcrest-all:1.3') { exclude group: 'org.hamcrest', module: 'hamcrest-core' } - compile "com.google.jimfs:jimfs:1.0" + compile 'com.google.jimfs:jimfs:1.0' compile "org.apache.httpcomponents:httpclient:${versions.httpclient}" } -// HACK: this is temporary until we have moved to gradle, at which -// point we can physically move the test framework files to this project -project.ext { - srcDir = new File(project.buildDir, 'src') - coreDir = new File(project("${projectsPrefix}:core").projectDir, 'src' + File.separator + 'test') -} -sourceSets.main.java.srcDir(new File(srcDir, "java")) -sourceSets.main.resources.srcDir(new File(srcDir, "resources")) -task copySourceFiles(type: Sync) { - from(coreDir) { - include 'resources/log4j.properties' - include 'java/org/elasticsearch/test/**' - include 'java/org/elasticsearch/bootstrap/BootstrapForTesting.java' - include 'java/org/elasticsearch/bootstrap/MockPluginPolicy.java' - include 'java/org/elasticsearch/common/cli/CliToolTestCase.java' - include 'java/org/elasticsearch/cluster/MockInternalClusterInfoService.java' - include 'java/org/elasticsearch/cluster/routing/TestShardRouting.java' - include 'java/org/elasticsearch/index/MockEngineFactoryPlugin.java' - include 'java/org/elasticsearch/search/MockSearchService.java' - include 'java/org/elasticsearch/search/aggregations/bucket/AbstractTermsTestCase.java' - include 'java/org/elasticsearch/search/aggregations/bucket/script/NativeSignificanceScoreScriptNoParams.java' - include 'java/org/elasticsearch/search/aggregations/bucket/script/NativeSignificanceScoreScriptWithParams.java' - include 'java/org/elasticsearch/search/aggregations/bucket/script/TestScript.java' - include 'java/org/elasticsearch/search/aggregations/metrics/AbstractNumericTestCase.java' - include 'java/org/elasticsearch/percolator/PercolatorTestUtil.java' - include 'java/org/elasticsearch/cache/recycler/MockPageCacheRecycler.java' - include 'java/org/elasticsearch/common/util/MockBigArrays.java' - include 'java/org/elasticsearch/node/NodeMocksPlugin.java' - include 'java/org/elasticsearch/node/MockNode.java' - include 'java/org/elasticsearch/common/io/PathUtilsForTesting.java' - // unit tests for yaml suite parser & rest spec parser need to be excluded - exclude 'java/org/elasticsearch/test/rest/test/**' - // unit tests for test framework classes - exclude 'java/org/elasticsearch/test/test/**' +compileJava.options.compilerArgs << '-Xlint:-cast,-deprecation,-fallthrough,-overrides,-rawtypes,-serial,-try,-unchecked' +compileTestJava.options.compilerArgs << '-Xlint:-rawtypes' - // no geo (requires optional deps) - exclude 'java/org/elasticsearch/test/hamcrest/ElasticsearchGeoAssertions.java' - exclude 'java/org/elasticsearch/test/geo/RandomShapeGenerator.java' - // this mock is just for a single logging test - exclude 'java/org/elasticsearch/test/MockLogAppender.java' - } - into srcDir +// the main files are actually test files, so use the appopriate forbidden api sigs +forbiddenApisMain { + bundledSignatures = ['jdk-unsafe', 'jdk-deprecated'] + signaturesURLs = [PrecommitTasks.getResource('/forbidden/all-signatures.txt'), + PrecommitTasks.getResource('/forbidden/test-signatures.txt')] } -compileJava.dependsOn copySourceFiles - -compileJava.options.compilerArgs << "-Xlint:-cast,-deprecation,-fallthrough,-overrides,-rawtypes,-serial,-try,-unchecked" diff --git a/core/src/test/java/org/elasticsearch/bootstrap/BootstrapForTesting.java b/test-framework/src/main/java/org/elasticsearch/bootstrap/BootstrapForTesting.java similarity index 100% rename from core/src/test/java/org/elasticsearch/bootstrap/BootstrapForTesting.java rename to test-framework/src/main/java/org/elasticsearch/bootstrap/BootstrapForTesting.java diff --git a/core/src/test/java/org/elasticsearch/cache/recycler/MockPageCacheRecycler.java b/test-framework/src/main/java/org/elasticsearch/cache/recycler/MockPageCacheRecycler.java similarity index 100% rename from core/src/test/java/org/elasticsearch/cache/recycler/MockPageCacheRecycler.java rename to test-framework/src/main/java/org/elasticsearch/cache/recycler/MockPageCacheRecycler.java diff --git a/core/src/test/java/org/elasticsearch/cluster/MockInternalClusterInfoService.java b/test-framework/src/main/java/org/elasticsearch/cluster/MockInternalClusterInfoService.java similarity index 100% rename from core/src/test/java/org/elasticsearch/cluster/MockInternalClusterInfoService.java rename to test-framework/src/main/java/org/elasticsearch/cluster/MockInternalClusterInfoService.java diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/TestShardRouting.java b/test-framework/src/main/java/org/elasticsearch/cluster/routing/TestShardRouting.java similarity index 100% rename from core/src/test/java/org/elasticsearch/cluster/routing/TestShardRouting.java rename to test-framework/src/main/java/org/elasticsearch/cluster/routing/TestShardRouting.java diff --git a/core/src/test/java/org/elasticsearch/common/cli/CliToolTestCase.java b/test-framework/src/main/java/org/elasticsearch/common/cli/CliToolTestCase.java similarity index 100% rename from core/src/test/java/org/elasticsearch/common/cli/CliToolTestCase.java rename to test-framework/src/main/java/org/elasticsearch/common/cli/CliToolTestCase.java diff --git a/core/src/test/java/org/elasticsearch/common/io/PathUtilsForTesting.java b/test-framework/src/main/java/org/elasticsearch/common/io/PathUtilsForTesting.java similarity index 100% rename from core/src/test/java/org/elasticsearch/common/io/PathUtilsForTesting.java rename to test-framework/src/main/java/org/elasticsearch/common/io/PathUtilsForTesting.java diff --git a/core/src/test/java/org/elasticsearch/common/util/MockBigArrays.java b/test-framework/src/main/java/org/elasticsearch/common/util/MockBigArrays.java similarity index 100% rename from core/src/test/java/org/elasticsearch/common/util/MockBigArrays.java rename to test-framework/src/main/java/org/elasticsearch/common/util/MockBigArrays.java diff --git a/core/src/test/java/org/elasticsearch/index/MockEngineFactoryPlugin.java b/test-framework/src/main/java/org/elasticsearch/index/MockEngineFactoryPlugin.java similarity index 100% rename from core/src/test/java/org/elasticsearch/index/MockEngineFactoryPlugin.java rename to test-framework/src/main/java/org/elasticsearch/index/MockEngineFactoryPlugin.java diff --git a/core/src/test/java/org/elasticsearch/node/MockNode.java b/test-framework/src/main/java/org/elasticsearch/node/MockNode.java similarity index 100% rename from core/src/test/java/org/elasticsearch/node/MockNode.java rename to test-framework/src/main/java/org/elasticsearch/node/MockNode.java diff --git a/core/src/test/java/org/elasticsearch/node/NodeMocksPlugin.java b/test-framework/src/main/java/org/elasticsearch/node/NodeMocksPlugin.java similarity index 100% rename from core/src/test/java/org/elasticsearch/node/NodeMocksPlugin.java rename to test-framework/src/main/java/org/elasticsearch/node/NodeMocksPlugin.java diff --git a/core/src/test/java/org/elasticsearch/percolator/PercolatorTestUtil.java b/test-framework/src/main/java/org/elasticsearch/percolator/PercolatorTestUtil.java similarity index 100% rename from core/src/test/java/org/elasticsearch/percolator/PercolatorTestUtil.java rename to test-framework/src/main/java/org/elasticsearch/percolator/PercolatorTestUtil.java diff --git a/core/src/test/java/org/elasticsearch/search/MockSearchService.java b/test-framework/src/main/java/org/elasticsearch/search/MockSearchService.java similarity index 100% rename from core/src/test/java/org/elasticsearch/search/MockSearchService.java rename to test-framework/src/main/java/org/elasticsearch/search/MockSearchService.java diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/AbstractTermsTestCase.java b/test-framework/src/main/java/org/elasticsearch/search/aggregations/bucket/AbstractTermsTestCase.java similarity index 100% rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/AbstractTermsTestCase.java rename to test-framework/src/main/java/org/elasticsearch/search/aggregations/bucket/AbstractTermsTestCase.java diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/script/NativeSignificanceScoreScriptNoParams.java b/test-framework/src/main/java/org/elasticsearch/search/aggregations/bucket/script/NativeSignificanceScoreScriptNoParams.java similarity index 100% rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/script/NativeSignificanceScoreScriptNoParams.java rename to test-framework/src/main/java/org/elasticsearch/search/aggregations/bucket/script/NativeSignificanceScoreScriptNoParams.java diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/script/NativeSignificanceScoreScriptWithParams.java b/test-framework/src/main/java/org/elasticsearch/search/aggregations/bucket/script/NativeSignificanceScoreScriptWithParams.java similarity index 100% rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/script/NativeSignificanceScoreScriptWithParams.java rename to test-framework/src/main/java/org/elasticsearch/search/aggregations/bucket/script/NativeSignificanceScoreScriptWithParams.java diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/script/TestScript.java b/test-framework/src/main/java/org/elasticsearch/search/aggregations/bucket/script/TestScript.java similarity index 100% rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/script/TestScript.java rename to test-framework/src/main/java/org/elasticsearch/search/aggregations/bucket/script/TestScript.java diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/AbstractNumericTestCase.java b/test-framework/src/main/java/org/elasticsearch/search/aggregations/metrics/AbstractNumericTestCase.java similarity index 100% rename from core/src/test/java/org/elasticsearch/search/aggregations/metrics/AbstractNumericTestCase.java rename to test-framework/src/main/java/org/elasticsearch/search/aggregations/metrics/AbstractNumericTestCase.java diff --git a/core/src/test/java/org/elasticsearch/test/BackgroundIndexer.java b/test-framework/src/main/java/org/elasticsearch/test/BackgroundIndexer.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/BackgroundIndexer.java rename to test-framework/src/main/java/org/elasticsearch/test/BackgroundIndexer.java diff --git a/core/src/test/java/org/elasticsearch/test/CompositeTestCluster.java b/test-framework/src/main/java/org/elasticsearch/test/CompositeTestCluster.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/CompositeTestCluster.java rename to test-framework/src/main/java/org/elasticsearch/test/CompositeTestCluster.java diff --git a/core/src/test/java/org/elasticsearch/test/CorruptionUtils.java b/test-framework/src/main/java/org/elasticsearch/test/CorruptionUtils.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/CorruptionUtils.java rename to test-framework/src/main/java/org/elasticsearch/test/CorruptionUtils.java diff --git a/core/src/test/java/org/elasticsearch/test/DummyShardLock.java b/test-framework/src/main/java/org/elasticsearch/test/DummyShardLock.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/DummyShardLock.java rename to test-framework/src/main/java/org/elasticsearch/test/DummyShardLock.java diff --git a/core/src/test/java/org/elasticsearch/test/ESAllocationTestCase.java b/test-framework/src/main/java/org/elasticsearch/test/ESAllocationTestCase.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/ESAllocationTestCase.java rename to test-framework/src/main/java/org/elasticsearch/test/ESAllocationTestCase.java diff --git a/core/src/test/java/org/elasticsearch/test/ESBackcompatTestCase.java b/test-framework/src/main/java/org/elasticsearch/test/ESBackcompatTestCase.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/ESBackcompatTestCase.java rename to test-framework/src/main/java/org/elasticsearch/test/ESBackcompatTestCase.java diff --git a/core/src/test/java/org/elasticsearch/test/ESIntegTestCase.java b/test-framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/ESIntegTestCase.java rename to test-framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java diff --git a/core/src/test/java/org/elasticsearch/test/ESSingleNodeTestCase.java b/test-framework/src/main/java/org/elasticsearch/test/ESSingleNodeTestCase.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/ESSingleNodeTestCase.java rename to test-framework/src/main/java/org/elasticsearch/test/ESSingleNodeTestCase.java diff --git a/core/src/test/java/org/elasticsearch/test/ESTestCase.java b/test-framework/src/main/java/org/elasticsearch/test/ESTestCase.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/ESTestCase.java rename to test-framework/src/main/java/org/elasticsearch/test/ESTestCase.java diff --git a/core/src/test/java/org/elasticsearch/test/ESTokenStreamTestCase.java b/test-framework/src/main/java/org/elasticsearch/test/ESTokenStreamTestCase.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/ESTokenStreamTestCase.java rename to test-framework/src/main/java/org/elasticsearch/test/ESTokenStreamTestCase.java diff --git a/core/src/test/java/org/elasticsearch/test/ExternalNode.java b/test-framework/src/main/java/org/elasticsearch/test/ExternalNode.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/ExternalNode.java rename to test-framework/src/main/java/org/elasticsearch/test/ExternalNode.java diff --git a/core/src/test/java/org/elasticsearch/test/ExternalTestCluster.java b/test-framework/src/main/java/org/elasticsearch/test/ExternalTestCluster.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/ExternalTestCluster.java rename to test-framework/src/main/java/org/elasticsearch/test/ExternalTestCluster.java diff --git a/core/src/test/java/org/elasticsearch/test/IndexSettingsModule.java b/test-framework/src/main/java/org/elasticsearch/test/IndexSettingsModule.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/IndexSettingsModule.java rename to test-framework/src/main/java/org/elasticsearch/test/IndexSettingsModule.java diff --git a/core/src/test/java/org/elasticsearch/test/InternalTestCluster.java b/test-framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/InternalTestCluster.java rename to test-framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java diff --git a/core/src/test/java/org/elasticsearch/test/MockIndexEventListener.java b/test-framework/src/main/java/org/elasticsearch/test/MockIndexEventListener.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/MockIndexEventListener.java rename to test-framework/src/main/java/org/elasticsearch/test/MockIndexEventListener.java diff --git a/core/src/test/java/org/elasticsearch/test/NodeConfigurationSource.java b/test-framework/src/main/java/org/elasticsearch/test/NodeConfigurationSource.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/NodeConfigurationSource.java rename to test-framework/src/main/java/org/elasticsearch/test/NodeConfigurationSource.java diff --git a/core/src/test/java/org/elasticsearch/test/StreamsUtils.java b/test-framework/src/main/java/org/elasticsearch/test/StreamsUtils.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/StreamsUtils.java rename to test-framework/src/main/java/org/elasticsearch/test/StreamsUtils.java diff --git a/core/src/test/java/org/elasticsearch/test/TestCluster.java b/test-framework/src/main/java/org/elasticsearch/test/TestCluster.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/TestCluster.java rename to test-framework/src/main/java/org/elasticsearch/test/TestCluster.java diff --git a/core/src/test/java/org/elasticsearch/test/TestSearchContext.java b/test-framework/src/main/java/org/elasticsearch/test/TestSearchContext.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/TestSearchContext.java rename to test-framework/src/main/java/org/elasticsearch/test/TestSearchContext.java diff --git a/core/src/test/java/org/elasticsearch/test/VersionUtils.java b/test-framework/src/main/java/org/elasticsearch/test/VersionUtils.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/VersionUtils.java rename to test-framework/src/main/java/org/elasticsearch/test/VersionUtils.java diff --git a/core/src/test/java/org/elasticsearch/test/XContentTestUtils.java b/test-framework/src/main/java/org/elasticsearch/test/XContentTestUtils.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/XContentTestUtils.java rename to test-framework/src/main/java/org/elasticsearch/test/XContentTestUtils.java diff --git a/core/src/test/java/org/elasticsearch/test/client/RandomizingClient.java b/test-framework/src/main/java/org/elasticsearch/test/client/RandomizingClient.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/client/RandomizingClient.java rename to test-framework/src/main/java/org/elasticsearch/test/client/RandomizingClient.java diff --git a/core/src/test/java/org/elasticsearch/test/cluster/NoopClusterService.java b/test-framework/src/main/java/org/elasticsearch/test/cluster/NoopClusterService.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/cluster/NoopClusterService.java rename to test-framework/src/main/java/org/elasticsearch/test/cluster/NoopClusterService.java diff --git a/core/src/test/java/org/elasticsearch/test/cluster/TestClusterService.java b/test-framework/src/main/java/org/elasticsearch/test/cluster/TestClusterService.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/cluster/TestClusterService.java rename to test-framework/src/main/java/org/elasticsearch/test/cluster/TestClusterService.java diff --git a/core/src/test/java/org/elasticsearch/test/discovery/ClusterDiscoveryConfiguration.java b/test-framework/src/main/java/org/elasticsearch/test/discovery/ClusterDiscoveryConfiguration.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/discovery/ClusterDiscoveryConfiguration.java rename to test-framework/src/main/java/org/elasticsearch/test/discovery/ClusterDiscoveryConfiguration.java diff --git a/core/src/test/java/org/elasticsearch/test/disruption/BlockClusterStateProcessing.java b/test-framework/src/main/java/org/elasticsearch/test/disruption/BlockClusterStateProcessing.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/disruption/BlockClusterStateProcessing.java rename to test-framework/src/main/java/org/elasticsearch/test/disruption/BlockClusterStateProcessing.java diff --git a/core/src/test/java/org/elasticsearch/test/disruption/IntermittentLongGCDisruption.java b/test-framework/src/main/java/org/elasticsearch/test/disruption/IntermittentLongGCDisruption.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/disruption/IntermittentLongGCDisruption.java rename to test-framework/src/main/java/org/elasticsearch/test/disruption/IntermittentLongGCDisruption.java diff --git a/core/src/test/java/org/elasticsearch/test/disruption/LongGCDisruption.java b/test-framework/src/main/java/org/elasticsearch/test/disruption/LongGCDisruption.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/disruption/LongGCDisruption.java rename to test-framework/src/main/java/org/elasticsearch/test/disruption/LongGCDisruption.java diff --git a/core/src/test/java/org/elasticsearch/test/disruption/NetworkDelaysPartition.java b/test-framework/src/main/java/org/elasticsearch/test/disruption/NetworkDelaysPartition.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/disruption/NetworkDelaysPartition.java rename to test-framework/src/main/java/org/elasticsearch/test/disruption/NetworkDelaysPartition.java diff --git a/core/src/test/java/org/elasticsearch/test/disruption/NetworkDisconnectPartition.java b/test-framework/src/main/java/org/elasticsearch/test/disruption/NetworkDisconnectPartition.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/disruption/NetworkDisconnectPartition.java rename to test-framework/src/main/java/org/elasticsearch/test/disruption/NetworkDisconnectPartition.java diff --git a/core/src/test/java/org/elasticsearch/test/disruption/NetworkPartition.java b/test-framework/src/main/java/org/elasticsearch/test/disruption/NetworkPartition.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/disruption/NetworkPartition.java rename to test-framework/src/main/java/org/elasticsearch/test/disruption/NetworkPartition.java diff --git a/core/src/test/java/org/elasticsearch/test/disruption/NetworkPartitionIT.java b/test-framework/src/main/java/org/elasticsearch/test/disruption/NetworkPartitionIT.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/disruption/NetworkPartitionIT.java rename to test-framework/src/main/java/org/elasticsearch/test/disruption/NetworkPartitionIT.java diff --git a/core/src/test/java/org/elasticsearch/test/disruption/NetworkUnresponsivePartition.java b/test-framework/src/main/java/org/elasticsearch/test/disruption/NetworkUnresponsivePartition.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/disruption/NetworkUnresponsivePartition.java rename to test-framework/src/main/java/org/elasticsearch/test/disruption/NetworkUnresponsivePartition.java diff --git a/core/src/test/java/org/elasticsearch/test/disruption/NoOpDisruptionScheme.java b/test-framework/src/main/java/org/elasticsearch/test/disruption/NoOpDisruptionScheme.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/disruption/NoOpDisruptionScheme.java rename to test-framework/src/main/java/org/elasticsearch/test/disruption/NoOpDisruptionScheme.java diff --git a/core/src/test/java/org/elasticsearch/test/disruption/ServiceDisruptionScheme.java b/test-framework/src/main/java/org/elasticsearch/test/disruption/ServiceDisruptionScheme.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/disruption/ServiceDisruptionScheme.java rename to test-framework/src/main/java/org/elasticsearch/test/disruption/ServiceDisruptionScheme.java diff --git a/core/src/test/java/org/elasticsearch/test/disruption/SingleNodeDisruption.java b/test-framework/src/main/java/org/elasticsearch/test/disruption/SingleNodeDisruption.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/disruption/SingleNodeDisruption.java rename to test-framework/src/main/java/org/elasticsearch/test/disruption/SingleNodeDisruption.java diff --git a/core/src/test/java/org/elasticsearch/test/disruption/SlowClusterStateProcessing.java b/test-framework/src/main/java/org/elasticsearch/test/disruption/SlowClusterStateProcessing.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/disruption/SlowClusterStateProcessing.java rename to test-framework/src/main/java/org/elasticsearch/test/disruption/SlowClusterStateProcessing.java diff --git a/core/src/test/java/org/elasticsearch/test/engine/AssertingSearcher.java b/test-framework/src/main/java/org/elasticsearch/test/engine/AssertingSearcher.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/engine/AssertingSearcher.java rename to test-framework/src/main/java/org/elasticsearch/test/engine/AssertingSearcher.java diff --git a/core/src/test/java/org/elasticsearch/test/engine/MockEngineFactory.java b/test-framework/src/main/java/org/elasticsearch/test/engine/MockEngineFactory.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/engine/MockEngineFactory.java rename to test-framework/src/main/java/org/elasticsearch/test/engine/MockEngineFactory.java diff --git a/core/src/test/java/org/elasticsearch/test/engine/MockEngineSupport.java b/test-framework/src/main/java/org/elasticsearch/test/engine/MockEngineSupport.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/engine/MockEngineSupport.java rename to test-framework/src/main/java/org/elasticsearch/test/engine/MockEngineSupport.java diff --git a/core/src/test/java/org/elasticsearch/test/engine/MockEngineSupportModule.java b/test-framework/src/main/java/org/elasticsearch/test/engine/MockEngineSupportModule.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/engine/MockEngineSupportModule.java rename to test-framework/src/main/java/org/elasticsearch/test/engine/MockEngineSupportModule.java diff --git a/core/src/test/java/org/elasticsearch/test/engine/MockInternalEngine.java b/test-framework/src/main/java/org/elasticsearch/test/engine/MockInternalEngine.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/engine/MockInternalEngine.java rename to test-framework/src/main/java/org/elasticsearch/test/engine/MockInternalEngine.java diff --git a/core/src/test/java/org/elasticsearch/test/engine/MockShadowEngine.java b/test-framework/src/main/java/org/elasticsearch/test/engine/MockShadowEngine.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/engine/MockShadowEngine.java rename to test-framework/src/main/java/org/elasticsearch/test/engine/MockShadowEngine.java diff --git a/core/src/test/java/org/elasticsearch/test/engine/ThrowingLeafReaderWrapper.java b/test-framework/src/main/java/org/elasticsearch/test/engine/ThrowingLeafReaderWrapper.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/engine/ThrowingLeafReaderWrapper.java rename to test-framework/src/main/java/org/elasticsearch/test/engine/ThrowingLeafReaderWrapper.java diff --git a/core/src/test/java/org/elasticsearch/test/gateway/NoopGatewayAllocator.java b/test-framework/src/main/java/org/elasticsearch/test/gateway/NoopGatewayAllocator.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/gateway/NoopGatewayAllocator.java rename to test-framework/src/main/java/org/elasticsearch/test/gateway/NoopGatewayAllocator.java diff --git a/core/src/test/java/org/elasticsearch/test/hamcrest/CollectionAssertions.java b/test-framework/src/main/java/org/elasticsearch/test/hamcrest/CollectionAssertions.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/hamcrest/CollectionAssertions.java rename to test-framework/src/main/java/org/elasticsearch/test/hamcrest/CollectionAssertions.java diff --git a/core/src/test/java/org/elasticsearch/test/hamcrest/CollectionMatchers.java b/test-framework/src/main/java/org/elasticsearch/test/hamcrest/CollectionMatchers.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/hamcrest/CollectionMatchers.java rename to test-framework/src/main/java/org/elasticsearch/test/hamcrest/CollectionMatchers.java diff --git a/core/src/test/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java b/test-framework/src/main/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java rename to test-framework/src/main/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java diff --git a/core/src/test/java/org/elasticsearch/test/hamcrest/ElasticsearchMatchers.java b/test-framework/src/main/java/org/elasticsearch/test/hamcrest/ElasticsearchMatchers.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/hamcrest/ElasticsearchMatchers.java rename to test-framework/src/main/java/org/elasticsearch/test/hamcrest/ElasticsearchMatchers.java diff --git a/core/src/test/java/org/elasticsearch/test/hamcrest/RegexMatcher.java b/test-framework/src/main/java/org/elasticsearch/test/hamcrest/RegexMatcher.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/hamcrest/RegexMatcher.java rename to test-framework/src/main/java/org/elasticsearch/test/hamcrest/RegexMatcher.java diff --git a/core/src/test/java/org/elasticsearch/test/junit/annotations/Network.java b/test-framework/src/main/java/org/elasticsearch/test/junit/annotations/Network.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/junit/annotations/Network.java rename to test-framework/src/main/java/org/elasticsearch/test/junit/annotations/Network.java diff --git a/core/src/test/java/org/elasticsearch/test/junit/annotations/TestLogging.java b/test-framework/src/main/java/org/elasticsearch/test/junit/annotations/TestLogging.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/junit/annotations/TestLogging.java rename to test-framework/src/main/java/org/elasticsearch/test/junit/annotations/TestLogging.java diff --git a/core/src/test/java/org/elasticsearch/test/junit/listeners/LoggingListener.java b/test-framework/src/main/java/org/elasticsearch/test/junit/listeners/LoggingListener.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/junit/listeners/LoggingListener.java rename to test-framework/src/main/java/org/elasticsearch/test/junit/listeners/LoggingListener.java diff --git a/core/src/test/java/org/elasticsearch/test/junit/listeners/ReproduceInfoPrinter.java b/test-framework/src/main/java/org/elasticsearch/test/junit/listeners/ReproduceInfoPrinter.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/junit/listeners/ReproduceInfoPrinter.java rename to test-framework/src/main/java/org/elasticsearch/test/junit/listeners/ReproduceInfoPrinter.java diff --git a/core/src/test/java/org/elasticsearch/test/junit/rule/RepeatOnExceptionRule.java b/test-framework/src/main/java/org/elasticsearch/test/junit/rule/RepeatOnExceptionRule.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/junit/rule/RepeatOnExceptionRule.java rename to test-framework/src/main/java/org/elasticsearch/test/junit/rule/RepeatOnExceptionRule.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/ESRestTestCase.java b/test-framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/ESRestTestCase.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/FakeRestRequest.java b/test-framework/src/main/java/org/elasticsearch/test/rest/FakeRestRequest.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/FakeRestRequest.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/FakeRestRequest.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/Rest0IT.java b/test-framework/src/main/java/org/elasticsearch/test/rest/Rest0IT.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/Rest0IT.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/Rest0IT.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/Rest1IT.java b/test-framework/src/main/java/org/elasticsearch/test/rest/Rest1IT.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/Rest1IT.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/Rest1IT.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/Rest2IT.java b/test-framework/src/main/java/org/elasticsearch/test/rest/Rest2IT.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/Rest2IT.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/Rest2IT.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/Rest3IT.java b/test-framework/src/main/java/org/elasticsearch/test/rest/Rest3IT.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/Rest3IT.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/Rest3IT.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/Rest4IT.java b/test-framework/src/main/java/org/elasticsearch/test/rest/Rest4IT.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/Rest4IT.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/Rest4IT.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/Rest5IT.java b/test-framework/src/main/java/org/elasticsearch/test/rest/Rest5IT.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/Rest5IT.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/Rest5IT.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/Rest6IT.java b/test-framework/src/main/java/org/elasticsearch/test/rest/Rest6IT.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/Rest6IT.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/Rest6IT.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/Rest7IT.java b/test-framework/src/main/java/org/elasticsearch/test/rest/Rest7IT.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/Rest7IT.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/Rest7IT.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/RestTestCandidate.java b/test-framework/src/main/java/org/elasticsearch/test/rest/RestTestCandidate.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/RestTestCandidate.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/RestTestCandidate.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/RestTestExecutionContext.java b/test-framework/src/main/java/org/elasticsearch/test/rest/RestTestExecutionContext.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/RestTestExecutionContext.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/RestTestExecutionContext.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/Stash.java b/test-framework/src/main/java/org/elasticsearch/test/rest/Stash.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/Stash.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/Stash.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/client/RestClient.java b/test-framework/src/main/java/org/elasticsearch/test/rest/client/RestClient.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/client/RestClient.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/client/RestClient.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/client/RestException.java b/test-framework/src/main/java/org/elasticsearch/test/rest/client/RestException.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/client/RestException.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/client/RestException.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/client/RestPath.java b/test-framework/src/main/java/org/elasticsearch/test/rest/client/RestPath.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/client/RestPath.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/client/RestPath.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/client/RestResponse.java b/test-framework/src/main/java/org/elasticsearch/test/rest/client/RestResponse.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/client/RestResponse.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/client/RestResponse.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/client/http/HttpDeleteWithEntity.java b/test-framework/src/main/java/org/elasticsearch/test/rest/client/http/HttpDeleteWithEntity.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/client/http/HttpDeleteWithEntity.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/client/http/HttpDeleteWithEntity.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/client/http/HttpGetWithEntity.java b/test-framework/src/main/java/org/elasticsearch/test/rest/client/http/HttpGetWithEntity.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/client/http/HttpGetWithEntity.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/client/http/HttpGetWithEntity.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/client/http/HttpRequestBuilder.java b/test-framework/src/main/java/org/elasticsearch/test/rest/client/http/HttpRequestBuilder.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/client/http/HttpRequestBuilder.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/client/http/HttpRequestBuilder.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/client/http/HttpResponse.java b/test-framework/src/main/java/org/elasticsearch/test/rest/client/http/HttpResponse.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/client/http/HttpResponse.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/client/http/HttpResponse.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/json/JsonPath.java b/test-framework/src/main/java/org/elasticsearch/test/rest/json/JsonPath.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/json/JsonPath.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/json/JsonPath.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/parser/DoSectionParser.java b/test-framework/src/main/java/org/elasticsearch/test/rest/parser/DoSectionParser.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/parser/DoSectionParser.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/parser/DoSectionParser.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/parser/GreaterThanEqualToParser.java b/test-framework/src/main/java/org/elasticsearch/test/rest/parser/GreaterThanEqualToParser.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/parser/GreaterThanEqualToParser.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/parser/GreaterThanEqualToParser.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/parser/GreaterThanParser.java b/test-framework/src/main/java/org/elasticsearch/test/rest/parser/GreaterThanParser.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/parser/GreaterThanParser.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/parser/GreaterThanParser.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/parser/IsFalseParser.java b/test-framework/src/main/java/org/elasticsearch/test/rest/parser/IsFalseParser.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/parser/IsFalseParser.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/parser/IsFalseParser.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/parser/IsTrueParser.java b/test-framework/src/main/java/org/elasticsearch/test/rest/parser/IsTrueParser.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/parser/IsTrueParser.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/parser/IsTrueParser.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/parser/LengthParser.java b/test-framework/src/main/java/org/elasticsearch/test/rest/parser/LengthParser.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/parser/LengthParser.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/parser/LengthParser.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/parser/LessThanOrEqualToParser.java b/test-framework/src/main/java/org/elasticsearch/test/rest/parser/LessThanOrEqualToParser.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/parser/LessThanOrEqualToParser.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/parser/LessThanOrEqualToParser.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/parser/LessThanParser.java b/test-framework/src/main/java/org/elasticsearch/test/rest/parser/LessThanParser.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/parser/LessThanParser.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/parser/LessThanParser.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/parser/MatchParser.java b/test-framework/src/main/java/org/elasticsearch/test/rest/parser/MatchParser.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/parser/MatchParser.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/parser/MatchParser.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/parser/RestTestFragmentParser.java b/test-framework/src/main/java/org/elasticsearch/test/rest/parser/RestTestFragmentParser.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/parser/RestTestFragmentParser.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/parser/RestTestFragmentParser.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/parser/RestTestParseException.java b/test-framework/src/main/java/org/elasticsearch/test/rest/parser/RestTestParseException.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/parser/RestTestParseException.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/parser/RestTestParseException.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/parser/RestTestSectionParser.java b/test-framework/src/main/java/org/elasticsearch/test/rest/parser/RestTestSectionParser.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/parser/RestTestSectionParser.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/parser/RestTestSectionParser.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/parser/RestTestSuiteParseContext.java b/test-framework/src/main/java/org/elasticsearch/test/rest/parser/RestTestSuiteParseContext.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/parser/RestTestSuiteParseContext.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/parser/RestTestSuiteParseContext.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/parser/RestTestSuiteParser.java b/test-framework/src/main/java/org/elasticsearch/test/rest/parser/RestTestSuiteParser.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/parser/RestTestSuiteParser.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/parser/RestTestSuiteParser.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/parser/SetSectionParser.java b/test-framework/src/main/java/org/elasticsearch/test/rest/parser/SetSectionParser.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/parser/SetSectionParser.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/parser/SetSectionParser.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/parser/SetupSectionParser.java b/test-framework/src/main/java/org/elasticsearch/test/rest/parser/SetupSectionParser.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/parser/SetupSectionParser.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/parser/SetupSectionParser.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/parser/SkipSectionParser.java b/test-framework/src/main/java/org/elasticsearch/test/rest/parser/SkipSectionParser.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/parser/SkipSectionParser.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/parser/SkipSectionParser.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/section/ApiCallSection.java b/test-framework/src/main/java/org/elasticsearch/test/rest/section/ApiCallSection.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/section/ApiCallSection.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/section/ApiCallSection.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/section/Assertion.java b/test-framework/src/main/java/org/elasticsearch/test/rest/section/Assertion.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/section/Assertion.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/section/Assertion.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/section/DoSection.java b/test-framework/src/main/java/org/elasticsearch/test/rest/section/DoSection.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/section/DoSection.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/section/DoSection.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/section/ExecutableSection.java b/test-framework/src/main/java/org/elasticsearch/test/rest/section/ExecutableSection.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/section/ExecutableSection.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/section/ExecutableSection.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/section/GreaterThanAssertion.java b/test-framework/src/main/java/org/elasticsearch/test/rest/section/GreaterThanAssertion.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/section/GreaterThanAssertion.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/section/GreaterThanAssertion.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/section/GreaterThanEqualToAssertion.java b/test-framework/src/main/java/org/elasticsearch/test/rest/section/GreaterThanEqualToAssertion.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/section/GreaterThanEqualToAssertion.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/section/GreaterThanEqualToAssertion.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/section/IsFalseAssertion.java b/test-framework/src/main/java/org/elasticsearch/test/rest/section/IsFalseAssertion.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/section/IsFalseAssertion.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/section/IsFalseAssertion.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/section/IsTrueAssertion.java b/test-framework/src/main/java/org/elasticsearch/test/rest/section/IsTrueAssertion.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/section/IsTrueAssertion.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/section/IsTrueAssertion.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/section/LengthAssertion.java b/test-framework/src/main/java/org/elasticsearch/test/rest/section/LengthAssertion.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/section/LengthAssertion.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/section/LengthAssertion.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/section/LessThanAssertion.java b/test-framework/src/main/java/org/elasticsearch/test/rest/section/LessThanAssertion.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/section/LessThanAssertion.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/section/LessThanAssertion.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/section/LessThanOrEqualToAssertion.java b/test-framework/src/main/java/org/elasticsearch/test/rest/section/LessThanOrEqualToAssertion.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/section/LessThanOrEqualToAssertion.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/section/LessThanOrEqualToAssertion.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/section/MatchAssertion.java b/test-framework/src/main/java/org/elasticsearch/test/rest/section/MatchAssertion.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/section/MatchAssertion.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/section/MatchAssertion.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/section/RestTestSuite.java b/test-framework/src/main/java/org/elasticsearch/test/rest/section/RestTestSuite.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/section/RestTestSuite.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/section/RestTestSuite.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/section/SetSection.java b/test-framework/src/main/java/org/elasticsearch/test/rest/section/SetSection.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/section/SetSection.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/section/SetSection.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/section/SetupSection.java b/test-framework/src/main/java/org/elasticsearch/test/rest/section/SetupSection.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/section/SetupSection.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/section/SetupSection.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/section/SkipSection.java b/test-framework/src/main/java/org/elasticsearch/test/rest/section/SkipSection.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/section/SkipSection.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/section/SkipSection.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/section/TestSection.java b/test-framework/src/main/java/org/elasticsearch/test/rest/section/TestSection.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/section/TestSection.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/section/TestSection.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/spec/RestApi.java b/test-framework/src/main/java/org/elasticsearch/test/rest/spec/RestApi.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/spec/RestApi.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/spec/RestApi.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/spec/RestApiParser.java b/test-framework/src/main/java/org/elasticsearch/test/rest/spec/RestApiParser.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/spec/RestApiParser.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/spec/RestApiParser.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/spec/RestSpec.java b/test-framework/src/main/java/org/elasticsearch/test/rest/spec/RestSpec.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/spec/RestSpec.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/spec/RestSpec.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/support/Features.java b/test-framework/src/main/java/org/elasticsearch/test/rest/support/Features.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/support/Features.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/support/Features.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/support/FileUtils.java b/test-framework/src/main/java/org/elasticsearch/test/rest/support/FileUtils.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/support/FileUtils.java rename to test-framework/src/main/java/org/elasticsearch/test/rest/support/FileUtils.java diff --git a/core/src/test/java/org/elasticsearch/test/store/MockFSDirectoryService.java b/test-framework/src/main/java/org/elasticsearch/test/store/MockFSDirectoryService.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/store/MockFSDirectoryService.java rename to test-framework/src/main/java/org/elasticsearch/test/store/MockFSDirectoryService.java diff --git a/core/src/test/java/org/elasticsearch/test/store/MockFSIndexStore.java b/test-framework/src/main/java/org/elasticsearch/test/store/MockFSIndexStore.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/store/MockFSIndexStore.java rename to test-framework/src/main/java/org/elasticsearch/test/store/MockFSIndexStore.java diff --git a/core/src/test/java/org/elasticsearch/test/transport/AssertingLocalTransport.java b/test-framework/src/main/java/org/elasticsearch/test/transport/AssertingLocalTransport.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/transport/AssertingLocalTransport.java rename to test-framework/src/main/java/org/elasticsearch/test/transport/AssertingLocalTransport.java diff --git a/core/src/test/java/org/elasticsearch/test/transport/CapturingTransport.java b/test-framework/src/main/java/org/elasticsearch/test/transport/CapturingTransport.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/transport/CapturingTransport.java rename to test-framework/src/main/java/org/elasticsearch/test/transport/CapturingTransport.java diff --git a/core/src/test/java/org/elasticsearch/test/transport/MockTransportService.java b/test-framework/src/main/java/org/elasticsearch/test/transport/MockTransportService.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/transport/MockTransportService.java rename to test-framework/src/main/java/org/elasticsearch/test/transport/MockTransportService.java diff --git a/core/src/test/resources/log4j.properties b/test-framework/src/main/resources/log4j.properties similarity index 100% rename from core/src/test/resources/log4j.properties rename to test-framework/src/main/resources/log4j.properties diff --git a/core/src/test/java/org/elasticsearch/test/rest/test/AbstractParserTestCase.java b/test-framework/src/test/java/org/elasticsearch/test/rest/test/AbstractParserTestCase.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/test/AbstractParserTestCase.java rename to test-framework/src/test/java/org/elasticsearch/test/rest/test/AbstractParserTestCase.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/test/AssertionParsersTests.java b/test-framework/src/test/java/org/elasticsearch/test/rest/test/AssertionParsersTests.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/test/AssertionParsersTests.java rename to test-framework/src/test/java/org/elasticsearch/test/rest/test/AssertionParsersTests.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/test/DoSectionParserTests.java b/test-framework/src/test/java/org/elasticsearch/test/rest/test/DoSectionParserTests.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/test/DoSectionParserTests.java rename to test-framework/src/test/java/org/elasticsearch/test/rest/test/DoSectionParserTests.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/test/FileUtilsTests.java b/test-framework/src/test/java/org/elasticsearch/test/rest/test/FileUtilsTests.java similarity index 77% rename from core/src/test/java/org/elasticsearch/test/rest/test/FileUtilsTests.java rename to test-framework/src/test/java/org/elasticsearch/test/rest/test/FileUtilsTests.java index b0df110f0a8..128cb862e57 100644 --- a/core/src/test/java/org/elasticsearch/test/rest/test/FileUtilsTests.java +++ b/test-framework/src/test/java/org/elasticsearch/test/rest/test/FileUtilsTests.java @@ -32,44 +32,44 @@ import static org.hamcrest.Matchers.greaterThan; public class FileUtilsTests extends ESTestCase { public void testLoadSingleYamlSuite() throws Exception { - Map> yamlSuites = FileUtils.findYamlSuites(null, "/rest-api-spec/test", "/rest-api-spec/test/get/10_basic"); - assertSingleFile(yamlSuites, "get", "10_basic.yaml"); + Map> yamlSuites = FileUtils.findYamlSuites(null, "/rest-api-spec/test", "/rest-api-spec/test/suite1/10_basic"); + assertSingleFile(yamlSuites, "suite1", "10_basic.yaml"); //the path prefix is optional - yamlSuites = FileUtils.findYamlSuites(null, "/rest-api-spec/test", "get/10_basic.yaml"); - assertSingleFile(yamlSuites, "get", "10_basic.yaml"); + yamlSuites = FileUtils.findYamlSuites(null, "/rest-api-spec/test", "suite1/10_basic.yaml"); + assertSingleFile(yamlSuites, "suite1", "10_basic.yaml"); //extension .yaml is optional - yamlSuites = FileUtils.findYamlSuites(null, "/rest-api-spec/test", "get/10_basic"); - assertSingleFile(yamlSuites, "get", "10_basic.yaml"); + yamlSuites = FileUtils.findYamlSuites(null, "/rest-api-spec/test", "suite1/10_basic"); + assertSingleFile(yamlSuites, "suite1", "10_basic.yaml"); } public void testLoadMultipleYamlSuites() throws Exception { //single directory - Map> yamlSuites = FileUtils.findYamlSuites(null, "/rest-api-spec/test", "get"); + Map> yamlSuites = FileUtils.findYamlSuites(null, "/rest-api-spec/test", "suite1"); assertThat(yamlSuites, notNullValue()); assertThat(yamlSuites.size(), equalTo(1)); - assertThat(yamlSuites.containsKey("get"), equalTo(true)); - assertThat(yamlSuites.get("get").size(), greaterThan(1)); + assertThat(yamlSuites.containsKey("suite1"), equalTo(true)); + assertThat(yamlSuites.get("suite1").size(), greaterThan(1)); //multiple directories - yamlSuites = FileUtils.findYamlSuites(null, "/rest-api-spec/test", "get", "index"); + yamlSuites = FileUtils.findYamlSuites(null, "/rest-api-spec/test", "suite1", "suite2"); assertThat(yamlSuites, notNullValue()); assertThat(yamlSuites.size(), equalTo(2)); - assertThat(yamlSuites.containsKey("get"), equalTo(true)); - assertThat(yamlSuites.get("get").size(), greaterThan(1)); - assertThat(yamlSuites.containsKey("index"), equalTo(true)); - assertThat(yamlSuites.get("index").size(), greaterThan(1)); + assertThat(yamlSuites.containsKey("suite1"), equalTo(true)); + assertEquals(2, yamlSuites.get("suite1").size()); + assertThat(yamlSuites.containsKey("suite2"), equalTo(true)); + assertEquals(2, yamlSuites.get("suite2").size()); //multiple paths, which can be both directories or yaml test suites (with optional file extension) - yamlSuites = FileUtils.findYamlSuites(null, "/rest-api-spec/test", "indices.forcemerge/10_basic", "index"); + yamlSuites = FileUtils.findYamlSuites(null, "/rest-api-spec/test", "suite2/10_basic", "suite1"); assertThat(yamlSuites, notNullValue()); assertThat(yamlSuites.size(), equalTo(2)); - assertThat(yamlSuites.containsKey("indices.forcemerge"), equalTo(true)); - assertThat(yamlSuites.get("indices.forcemerge").size(), equalTo(1)); - assertSingleFile(yamlSuites.get("indices.forcemerge"), "indices.forcemerge", "10_basic.yaml"); - assertThat(yamlSuites.containsKey("index"), equalTo(true)); - assertThat(yamlSuites.get("index").size(), greaterThan(1)); + assertThat(yamlSuites.containsKey("suite2"), equalTo(true)); + assertThat(yamlSuites.get("suite2").size(), equalTo(1)); + assertSingleFile(yamlSuites.get("suite2"), "suite2", "10_basic.yaml"); + assertThat(yamlSuites.containsKey("suite1"), equalTo(true)); + assertThat(yamlSuites.get("suite1").size(), greaterThan(1)); //files can be loaded from classpath and from file system too Path dir = createTempDir(); diff --git a/core/src/test/java/org/elasticsearch/test/rest/test/JsonPathTests.java b/test-framework/src/test/java/org/elasticsearch/test/rest/test/JsonPathTests.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/test/JsonPathTests.java rename to test-framework/src/test/java/org/elasticsearch/test/rest/test/JsonPathTests.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/test/RestApiParserFailingTests.java b/test-framework/src/test/java/org/elasticsearch/test/rest/test/RestApiParserFailingTests.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/test/RestApiParserFailingTests.java rename to test-framework/src/test/java/org/elasticsearch/test/rest/test/RestApiParserFailingTests.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/test/RestApiParserTests.java b/test-framework/src/test/java/org/elasticsearch/test/rest/test/RestApiParserTests.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/test/RestApiParserTests.java rename to test-framework/src/test/java/org/elasticsearch/test/rest/test/RestApiParserTests.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/test/RestTestParserTests.java b/test-framework/src/test/java/org/elasticsearch/test/rest/test/RestTestParserTests.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/test/RestTestParserTests.java rename to test-framework/src/test/java/org/elasticsearch/test/rest/test/RestTestParserTests.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/test/SetSectionParserTests.java b/test-framework/src/test/java/org/elasticsearch/test/rest/test/SetSectionParserTests.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/test/SetSectionParserTests.java rename to test-framework/src/test/java/org/elasticsearch/test/rest/test/SetSectionParserTests.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/test/SetupSectionParserTests.java b/test-framework/src/test/java/org/elasticsearch/test/rest/test/SetupSectionParserTests.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/test/SetupSectionParserTests.java rename to test-framework/src/test/java/org/elasticsearch/test/rest/test/SetupSectionParserTests.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/test/SkipSectionParserTests.java b/test-framework/src/test/java/org/elasticsearch/test/rest/test/SkipSectionParserTests.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/test/SkipSectionParserTests.java rename to test-framework/src/test/java/org/elasticsearch/test/rest/test/SkipSectionParserTests.java diff --git a/core/src/test/java/org/elasticsearch/test/rest/test/TestSectionParserTests.java b/test-framework/src/test/java/org/elasticsearch/test/rest/test/TestSectionParserTests.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/rest/test/TestSectionParserTests.java rename to test-framework/src/test/java/org/elasticsearch/test/rest/test/TestSectionParserTests.java diff --git a/core/src/test/java/org/elasticsearch/test/test/InternalTestClusterTests.java b/test-framework/src/test/java/org/elasticsearch/test/test/InternalTestClusterTests.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/test/InternalTestClusterTests.java rename to test-framework/src/test/java/org/elasticsearch/test/test/InternalTestClusterTests.java diff --git a/core/src/test/java/org/elasticsearch/test/test/LoggingListenerTests.java b/test-framework/src/test/java/org/elasticsearch/test/test/LoggingListenerTests.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/test/LoggingListenerTests.java rename to test-framework/src/test/java/org/elasticsearch/test/test/LoggingListenerTests.java diff --git a/core/src/test/java/org/elasticsearch/test/test/SuiteScopeClusterIT.java b/test-framework/src/test/java/org/elasticsearch/test/test/SuiteScopeClusterIT.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/test/SuiteScopeClusterIT.java rename to test-framework/src/test/java/org/elasticsearch/test/test/SuiteScopeClusterIT.java diff --git a/core/src/test/java/org/elasticsearch/test/test/TestScopeClusterIT.java b/test-framework/src/test/java/org/elasticsearch/test/test/TestScopeClusterIT.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/test/TestScopeClusterIT.java rename to test-framework/src/test/java/org/elasticsearch/test/test/TestScopeClusterIT.java diff --git a/core/src/test/java/org/elasticsearch/test/test/VersionUtilsTests.java b/test-framework/src/test/java/org/elasticsearch/test/test/VersionUtilsTests.java similarity index 100% rename from core/src/test/java/org/elasticsearch/test/test/VersionUtilsTests.java rename to test-framework/src/test/java/org/elasticsearch/test/test/VersionUtilsTests.java diff --git a/test-framework/src/test/resources/rest-api-spec/test/suite1/10_basic.yaml b/test-framework/src/test/resources/rest-api-spec/test/suite1/10_basic.yaml new file mode 100644 index 00000000000..0689f714d64 --- /dev/null +++ b/test-framework/src/test/resources/rest-api-spec/test/suite1/10_basic.yaml @@ -0,0 +1,31 @@ +--- +"Basic": + + - do: + index: + index: test_1 + type: test + id: 中文 + body: { "foo": "Hello: 中文" } + + - do: + get: + index: test_1 + type: test + id: 中文 + + - match: { _index: test_1 } + - match: { _type: test } + - match: { _id: 中文 } + - match: { _source: { foo: "Hello: 中文" } } + + - do: + get: + index: test_1 + type: _all + id: 中文 + + - match: { _index: test_1 } + - match: { _type: test } + - match: { _id: 中文 } + - match: { _source: { foo: "Hello: 中文" } } diff --git a/test-framework/src/test/resources/rest-api-spec/test/suite1/20_another_test.yaml b/test-framework/src/test/resources/rest-api-spec/test/suite1/20_another_test.yaml new file mode 100644 index 00000000000..5e08112253e --- /dev/null +++ b/test-framework/src/test/resources/rest-api-spec/test/suite1/20_another_test.yaml @@ -0,0 +1,21 @@ +--- +"Default values": + + - do: + index: + index: test_1 + type: test + id: 1 + body: { "foo": "bar" } + + - do: + get: + index: test_1 + type: _all + id: 1 + + - match: { _index: test_1 } + - match: { _type: test } + - match: { _id: '1' } + - match: { _source: { foo: "bar" } } + diff --git a/test-framework/src/test/resources/rest-api-spec/test/suite2/10_basic.yaml b/test-framework/src/test/resources/rest-api-spec/test/suite2/10_basic.yaml new file mode 100644 index 00000000000..745e1117402 --- /dev/null +++ b/test-framework/src/test/resources/rest-api-spec/test/suite2/10_basic.yaml @@ -0,0 +1,26 @@ +--- +"Index with ID": + + - do: + index: + index: test-weird-index-中文 + type: weird.type + id: 1 + body: { foo: bar } + + - match: { _index: test-weird-index-中文 } + - match: { _type: weird.type } + - match: { _id: "1"} + - match: { _version: 1} + + - do: + get: + index: test-weird-index-中文 + type: weird.type + id: 1 + + - match: { _index: test-weird-index-中文 } + - match: { _type: weird.type } + - match: { _id: "1"} + - match: { _version: 1} + - match: { _source: { foo: bar }} diff --git a/test-framework/src/test/resources/rest-api-spec/test/suite2/15_test2.yaml b/test-framework/src/test/resources/rest-api-spec/test/suite2/15_test2.yaml new file mode 100644 index 00000000000..3fff0512b96 --- /dev/null +++ b/test-framework/src/test/resources/rest-api-spec/test/suite2/15_test2.yaml @@ -0,0 +1,26 @@ +--- +"Index without ID": + + - do: + index: + index: test_1 + type: test + body: { foo: bar } + + - is_true: _id + - match: { _index: test_1 } + - match: { _type: test } + - match: { _version: 1 } + - set: { _id: id } + + - do: + get: + index: test_1 + type: test + id: '$id' + + - match: { _index: test_1 } + - match: { _type: test } + - match: { _id: $id } + - match: { _version: 1 } + - match: { _source: { foo: bar }}