Skip to content

Commit 94ec542

Browse files
authored
Use docker-setup.sh from upstream .ci repo (#1227) (#1229)
* Use docker-setup.sh from upstream .ci repo (#1227) The custom docker-setup.sh script here is not materially different from the shared script in the `.ci` repository. The only difference were pulling and starting the elasticsearch image. This should not affect CI materially and the consistency gain we get using the same `docker-setup.sh` file everywhere is preferrable to having a slightly different script here. * fix integration test targets * Fix metrics spec This commit backports the part of https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1220/files#diff-4ac1f3b518168b2e30c23d2c20e6eb3c4fa19c45a560bf481bca5641d41e968a that accounts for ES main/9.x. See #1229 (comment) for detailed breakdown.
1 parent f019f62 commit 94ec542

File tree

3 files changed

+8
-94
lines changed

3 files changed

+8
-94
lines changed

.ci/docker-setup.sh

Lines changed: 0 additions & 89 deletions
This file was deleted.

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ jobs:
1111
- env: INTEGRATION=true SNAPSHOT=true LOG_LEVEL=info ELASTIC_STACK_VERSION=7.current
1212
- env: INTEGRATION=true SNAPSHOT=true LOG_LEVEL=info ELASTIC_STACK_VERSION=8.previous
1313
- env: INTEGRATION=true SNAPSHOT=true LOG_LEVEL=info ELASTIC_STACK_VERSION=8.current
14-
- env: INTEGRATION=true SNAPSHOT=true LOG_LEVEL=info ELASTIC_STACK_VERSION=8.next
15-
- env: INTEGRATION=true SNAPSHOT=true LOG_LEVEL=info ELASTIC_STACK_VERSION=9.next
14+
- env: INTEGRATION=true SNAPSHOT=true LOG_LEVEL=info ELASTIC_STACK_VERSION=9.current
1615
- env: INTEGRATION=true SNAPSHOT=true LOG_LEVEL=info ELASTIC_STACK_VERSION=main
1716
- stage: "Secure Integration Tests"
1817
env: SECURE_INTEGRATION=true INTEGRATION=true LOG_LEVEL=info ELASTIC_STACK_VERSION=7.current
@@ -22,5 +21,6 @@ jobs:
2221
- env: SECURE_INTEGRATION=true INTEGRATION=true LOG_LEVEL=info ELASTIC_STACK_VERSION=9.current
2322
- env: SECURE_INTEGRATION=true INTEGRATION=true LOG_LEVEL=info ELASTIC_STACK_VERSION=9.current ES_SSL_KEY_INVALID=true
2423
- env: SECURE_INTEGRATION=true INTEGRATION=true LOG_LEVEL=info ELASTIC_STACK_VERSION=9.current ES_SSL_SUPPORTED_PROTOCOLS=TLSv1.3
25-
- env: SECURE_INTEGRATION=true INTEGRATION=true LOG_LEVEL=info SNAPSHOT=true ELASTIC_STACK_VERSION=8.next
26-
- env: SECURE_INTEGRATION=true INTEGRATION=true LOG_LEVEL=info SNAPSHOT=true ELASTIC_STACK_VERSION=9.next
24+
- env: SECURE_INTEGRATION=true INTEGRATION=true LOG_LEVEL=info SNAPSHOT=true ELASTIC_STACK_VERSION=8.current
25+
- env: SECURE_INTEGRATION=true INTEGRATION=true LOG_LEVEL=info SNAPSHOT=true ELASTIC_STACK_VERSION=9.current
26+
- env: SECURE_INTEGRATION=true INTEGRATION=true LOG_LEVEL=info SNAPSHOT=true ELASTIC_STACK_VERSION=main

spec/integration/outputs/metrics_spec.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
require "logstash/outputs/elasticsearch"
66
settings = {
77
"manage_template" => false,
8-
"hosts" => "#{get_host_port()}"
8+
"hosts" => "#{get_host_port()}",
9+
# write data to a random non templated index to ensure the bulk partially fails
10+
# don't use streams like "logs-*" as those have failure stores enabled, causing the bulk to succeed instead
11+
"index" => "custom_index_#{rand(10000)}"
912
}
1013
plugin = LogStash::Outputs::ElasticSearch.new(settings)
1114
end

0 commit comments

Comments
 (0)