forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'elastic/master' into opt-out-query-cach…
…e-default-distribution * elastic/master: (213 commits) ML: Fix build after HLRC change Fix inner hits retrieval when stored fields are disabled (_none_) (elastic#33018) SQL: Show/desc commands now support table ids (elastic#33363) Mute testValidateFollowingIndexSettings HLRC: Add delete by query API (elastic#32782) [ML] The sort field on get records should default to the record_score (elastic#33358) [ML] Minor improvements to categorization Grok pattern creation (elastic#33353) [DOCS] fix a couple of typos (elastic#33356) Disable assemble task instead of removing it (elastic#33348) Simplify the return type of FieldMapper#parse. (elastic#32654) [ML] Delete forecast API (elastic#31134) (elastic#33218) Introduce private settings (elastic#33327) [Docs] Add search timeout caveats (elastic#33354) TESTS: Fix Race Condition in Temp Path Creation (elastic#33352) Fix from_range in search_after in changes snapshot (elastic#33335) TESTS+DISTR.: Fix testIndexCheckOnStartup Flake (elastic#33349) Null completion field should not throw IAE (elastic#33268) Adds code to help with IndicesRequestCacheIT failures (elastic#33313) Prevent NPE parsing the stop datafeed request. (elastic#33347) HLRC: Add ML get overall buckets API (elastic#33297) ...
- Loading branch information
Showing
332 changed files
with
17,858 additions
and
3,164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
buildSrc/src/test/java/org/elasticsearch/gradle/BuildPluginIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/* | ||
* 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. | ||
*/ | ||
package org.elasticsearch.gradle; | ||
|
||
import org.apache.commons.io.IOUtils; | ||
import org.elasticsearch.gradle.test.GradleIntegrationTestCase; | ||
import org.gradle.testkit.runner.BuildResult; | ||
|
||
import java.io.File; | ||
import java.io.IOException; | ||
import java.io.InputStream; | ||
import java.nio.charset.StandardCharsets; | ||
import java.util.zip.ZipEntry; | ||
import java.util.zip.ZipFile; | ||
|
||
public class BuildPluginIT extends GradleIntegrationTestCase { | ||
|
||
public void testPluginCanBeApplied() { | ||
BuildResult result = getGradleRunner("elasticsearch.build") | ||
.withArguments("hello", "-s") | ||
.build(); | ||
assertTaskSuccessful(result, ":hello"); | ||
assertOutputContains("build plugin can be applied"); | ||
} | ||
|
||
public void testCheckTask() { | ||
BuildResult result = getGradleRunner("elasticsearch.build") | ||
.withArguments("check", "assemble", "-s", "-Dlocal.repo.path=" + getLocalTestRepoPath()) | ||
.build(); | ||
assertTaskSuccessful(result, ":check"); | ||
} | ||
|
||
public void testLicenseAndNotice() throws IOException { | ||
BuildResult result = getGradleRunner("elasticsearch.build") | ||
.withArguments("clean", "assemble", "-s", "-Dlocal.repo.path=" + getLocalTestRepoPath()) | ||
.build(); | ||
|
||
assertTaskSuccessful(result, ":assemble"); | ||
|
||
assertBuildFileExists(result, "elasticsearch.build", "distributions/elasticsearch.build.jar"); | ||
|
||
try (ZipFile zipFile = new ZipFile(new File( | ||
getBuildDir("elasticsearch.build"), "distributions/elasticsearch.build.jar" | ||
))) { | ||
ZipEntry licenseEntry = zipFile.getEntry("META-INF/LICENSE.txt"); | ||
ZipEntry noticeEntry = zipFile.getEntry("META-INF/NOTICE.txt"); | ||
assertNotNull("Jar does not have META-INF/LICENSE.txt", licenseEntry); | ||
assertNotNull("Jar does not have META-INF/NOTICE.txt", noticeEntry); | ||
try ( | ||
InputStream license = zipFile.getInputStream(licenseEntry); | ||
InputStream notice = zipFile.getInputStream(noticeEntry) | ||
) { | ||
assertEquals("this is a test license file", IOUtils.toString(license, StandardCharsets.UTF_8.name())); | ||
assertEquals("this is a test notice file", IOUtils.toString(notice, StandardCharsets.UTF_8.name())); | ||
} | ||
} | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
this is a test license file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
this is a test notice file |
Oops, something went wrong.