Skip to content

Commit

Permalink
Make logstash node system test more stable (#5797)
Browse files Browse the repository at this point in the history
* Make logstash node system test more stable
  • Loading branch information
ruflin authored and exekias committed Dec 3, 2017
1 parent 9c518fe commit f9779e1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion metricbeat/module/logstash/_meta/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM docker.elastic.co/logstash/logstash:6.0.0

COPY healthcheck.sh /
ENV XPACK_MONITORING_ENABLED=FALSE
HEALTHCHECK --interval=1s --retries=90 CMD curl -f http://localhost:9600/_node/stats
HEALTHCHECK --interval=1s --retries=90 CMD sh /healthcheck.sh
6 changes: 6 additions & 0 deletions metricbeat/module/logstash/_meta/healthcheck.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

# Check that both endpoints are available
curl -f http://localhost:9600/_node || exit 1
curl -f http://localhost:9600/_node/stats || exit 1
curl -f http://localhost:9600/_node/stats | grep '"in":' || exit 1
1 change: 0 additions & 1 deletion metricbeat/module/logstash/node/node_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
)

func TestFetch(t *testing.T) {

compose.EnsureUpWithTimeout(t, 120, "logstash")

f := mbtest.NewEventFetcher(t, logstash.GetConfig("node"))
Expand Down
3 changes: 2 additions & 1 deletion metricbeat/tests/system/test_logstash.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
import metricbeat
import unittest
import time


class Test(metricbeat.BaseTest):
Expand Down Expand Up @@ -33,7 +34,7 @@ def test_node(self):
self.assert_fields_are_documented(evt)

@unittest.skipUnless(metricbeat.INTEGRATION_TESTS, "integration test")
def test_node(self):
def test_node_stats(self):
"""
logstash node_stats metricset test
"""
Expand Down

0 comments on commit f9779e1

Please sign in to comment.