Skip to content

Commit

Permalink
Add supported-versions and update docker-compose for logstash module (#…
Browse files Browse the repository at this point in the history
…29440)

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.
  • Loading branch information
matschaffer authored Feb 8, 2022
1 parent ce2e5c2 commit 478a5ce
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.12.0}-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.12.0}
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.12.0}-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.12.0}
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 478a5ce

Please sign in to comment.