Skip to content

Commit 1bc3e69

Browse files
authored
Migrate some of the Docker tests from old repository (#49792)
Backport of #49079. Reimplement a number of the tests from elastic/elasticsearch-docker. There is also one Docker image fix here, which is that two of the provided config files had different file permissions to the rest. I've fixed this with another RUN chmod while building the image, and adjusted the corresponding packaging test.
1 parent 408f25e commit 1bc3e69

File tree

5 files changed

+343
-100
lines changed

5 files changed

+343
-100
lines changed

distribution/docker/src/docker/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ RUN grep ES_DISTRIBUTION_TYPE=tar /usr/share/elasticsearch/bin/elasticsearch-env
3333
RUN mkdir -p config data logs
3434
RUN chmod 0775 config data logs
3535
COPY config/elasticsearch.yml config/log4j2.properties config/
36+
RUN chmod 0660 config/elasticsearch.yml config/log4j2.properties
3637

3738
################################################################################
3839
# Build stage 1 (the actual elasticsearch image):

distribution/docker/src/docker/bin/docker-entrypoint.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,8 @@ declare -a es_opts
8585
while IFS='=' read -r envvar_key envvar_value
8686
do
8787
# Elasticsearch settings need to have at least two dot separated lowercase
88-
# words, e.g. `cluster.name`, except for `processors` which we handle
89-
# specially
90-
if [[ "$envvar_key" =~ ^[a-z0-9_]+\.[a-z0-9_]+ || "$envvar_key" == "processors" ]]; then
88+
# words, e.g. `cluster.name`
89+
if [[ "$envvar_key" =~ ^[a-z0-9_]+\.[a-z0-9_]+ ]]; then
9190
if [[ ! -z $envvar_value ]]; then
9291
es_opt="-E${envvar_key}=${envvar_value}"
9392
es_opts+=("${es_opt}")

qa/os/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ dependencies {
3636
compile "commons-logging:commons-logging:${versions.commonslogging}"
3737

3838
compile project(':libs:elasticsearch-core')
39+
40+
testCompile "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}"
41+
testCompile "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
42+
testCompile "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
3943
}
4044

4145
forbiddenApisTest {

0 commit comments

Comments
 (0)