Skip to content

Commit

Permalink
[8.0](backport #29440) Add supported-versions and update docker-compo…
Browse files Browse the repository at this point in the history
…se for logstash module (#30268)

Updates logstash module tests to run on more recent and multiple logstash versions.

Completely skip logstash python tests to avoid running compose scenarios for skipped tests.

(cherry picked from commit 478a5ce)

It's just a _little_ odd to have 8.1 being tested by metricbeat 8.0. But I think this will help keep backports easier.

In theory it could also help ensure 8.0 metricbeat updates don't break support for 8.1 logstash monitoring. Though such changes are probably unlikely.

Co-authored-by: Mat Schaffer <[email protected]>
  • Loading branch information
mergify[bot] and matschaffer authored Feb 17, 2022
1 parent 7aedad2 commit 83de048
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
5 changes: 5 additions & 0 deletions metricbeat/module/logstash/_meta/supported-versions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
variants:
- LOGSTASH_VERSION: 8.1.0-aa69d697-SNAPSHOT
- LOGSTASH_VERSION: 8.0.0-rc2
- LOGSTASH_VERSION: 7.17.1-aa300c4a-SNAPSHOT
- LOGSTASH_VERSION: 7.17.0
12 changes: 6 additions & 6 deletions metricbeat/module/logstash/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@ version: '2.3'

services:
logstash:
image: docker.elastic.co/integrations-ci/beats-logstash:${LOGSTASH_VERSION:-7.15.1}-1
image: docker.elastic.co/integrations-ci/beats-logstash:${LOGSTASH_VERSION:-8.1.0-aa69d697-SNAPSHOT}-1
build:
context: ./_meta
args:
LOGSTASH_VERSION: ${LOGSTASH_VERSION:-7.15.1}
LOGSTASH_VERSION: ${LOGSTASH_VERSION:-8.1.0-aa69d697-SNAPSHOT}
ports:
- 9600
- "9600"
depends_on:
- elasticsearch

elasticsearch:
image: docker.elastic.co/integrations-ci/beats-elasticsearch:${ELASTICSEARCH_VERSION:-7.15.1}-1
image: docker.elastic.co/integrations-ci/beats-elasticsearch:${ELASTICSEARCH_VERSION:-8.1.0-aa69d697-SNAPSHOT}-1
build:
context: ../elasticsearch/_meta
args:
ELASTICSEARCH_VERSION: ${ELASTICSEARCH_VERSION:-7.15.1}
ELASTICSEARCH_VERSION: ${ELASTICSEARCH_VERSION:-8.1.0-aa69d697-SNAPSHOT}
environment:
- "network.host="
- "transport.host=127.0.0.1"
- "http.host=0.0.0.0"
ports:
- 9200
- "9200"
6 changes: 2 additions & 4 deletions metricbeat/module/logstash/test_logstash.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import urllib.request


@metricbeat.parameterized_with_supported_versions
@unittest.skip("Unsure which fields can be deleted")
class Test(metricbeat.BaseTest):

COMPOSE_SERVICES = ['logstash']
Expand All @@ -20,8 +22,6 @@ def test_node(self):
"""
logstash node metricset test
"""
unittest.skip('Skipping this test to check documented fields. We will unskip once we know which fields can be deleted')
return
self.check_metricset("logstash", "node", self.get_hosts(), self.FIELDS + ["process"])

@unittest.skipUnless(metricbeat.INTEGRATION_TESTS, "integration test")
Expand All @@ -30,8 +30,6 @@ def test_node_stats(self):
"""
logstash node_stats metricset test
"""
unittest.skip('Skipping this test to check documented fields. We will unskip once we know which fields can be deleted')
return
self.check_metricset("logstash", "node_stats", self.get_hosts(), self.FIELDS)

@unittest.skipUnless(metricbeat.INTEGRATION_TESTS, "integration test")
Expand Down

0 comments on commit 83de048

Please sign in to comment.