Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick #8656 to 6.4: Do not rely on an specific memcached version for autodiscover test #8665

Merged
merged 1 commit into from
Oct 22, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions metricbeat/tests/system/test_autodiscover.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test_docker(self):
'docker': {
'templates': '''
- condition:
equals.docker.container.image: memcached:1.5.3
equals.docker.container.image: memcached:latest
config:
- module: memcached
metricsets: ["stats"]
Expand All @@ -37,8 +37,8 @@ def test_docker(self):
)

proc = self.start_beat()
docker_client.images.pull('memcached:1.5.3')
container = docker_client.containers.run('memcached:1.5.3', detach=True)
docker_client.images.pull('memcached:latest')
container = docker_client.containers.run('memcached:latest', detach=True)

self.wait_until(lambda: self.log_contains('Starting runner: memcached'))

Expand All @@ -51,7 +51,7 @@ def test_docker(self):
proc.check_kill_and_wait()

# Check metadata is added
assert output[0]['docker']['container']['image'] == 'memcached:1.5.3'
assert output[0]['docker']['container']['image'] == 'memcached:latest'
assert output[0]['docker']['container']['labels'] == {}
assert 'name' in output[0]['docker']['container']

Expand All @@ -74,13 +74,13 @@ def test_docker_labels(self):
)

proc = self.start_beat()
docker_client.images.pull('memcached:1.5.3')
docker_client.images.pull('memcached:latest')
labels = {
'co.elastic.metrics/module': 'memcached',
'co.elastic.metrics/period': '1s',
'co.elastic.metrics/hosts': "'${data.host}:11211'",
}
container = docker_client.containers.run('memcached:1.5.3', labels=labels, detach=True)
container = docker_client.containers.run('memcached:latest', labels=labels, detach=True)

self.wait_until(lambda: self.log_contains('Starting runner: memcached'))

Expand All @@ -93,5 +93,5 @@ def test_docker_labels(self):
proc.check_kill_and_wait()

# Check metadata is added
assert output[0]['docker']['container']['image'] == 'memcached:1.5.3'
assert output[0]['docker']['container']['image'] == 'memcached:latest'
assert 'name' in output[0]['docker']['container']