Skip to content

Commit

Permalink
(elastic#52) Add tests for vSphere
Browse files Browse the repository at this point in the history
  • Loading branch information
mdelapenya committed Sep 30, 2019
1 parent a28658d commit 4f0c9ba
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cli/config/compose/services/vsphere.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: '3'
services:
vsphere:
image: "nimmis/vcsim:${vsphereTag}"
container_name: vsphere
healthcheck:
test: ["CMD", "curl", "--write-out", "'HTTP %{http_code}'", "--silent", "--output", "/dev/null", "http://vsphere:443/"]
retries: 10
interval: 10s
18 changes: 18 additions & 0 deletions metricbeat-tests/configurations/vsphere.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
metricbeat.config:
modules:
path: ${path.config}/modules.d/*.yml
# Reload module configs as they change:
reload.enabled: false

metricbeat.modules:
- module: vsphere
metricsets:
- datastore
- host
- virtualmachine
enabled: true
period: 5s
hosts: ["https://vsphere:443/sdk"]
username: "user"
password: "pass"
insecure: true
11 changes: 11 additions & 0 deletions metricbeat-tests/features/vsphere.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@vsphere
Feature: As a Metricbeat developer I want to check that the vSphere module works as expected

Scenario Outline: Check module is sending metrics to Elasticsearch
Given vSphere "<vsphere_version>" is running for metricbeat "<metricbeat_version>"
And metricbeat "<metricbeat_version>" is installed and configured for vSphere module
Then there are no errors in the index
Examples:
| vsphere_version | metricbeat_version |
| latest | 7.3.0 |
| latest | 8.0.0-SNAPSHOT |

0 comments on commit 4f0c9ba

Please sign in to comment.