-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable system tests for auditbeat (#5945)
* Enable system tests for auditbeat * There were system tests and system integration tests for auditbeat but so far they were not run. * Integration tests enabled * Module config changed to module that works on more systems. Limitation for linux removed. Change noxpack path readd es_beats path remove kibana snapshot file one more check for xpack0 to see if timeout becomes less of a problem readd go packages unify metricbeat / auditbeat to find problem update travis, rename beat-path as double used remove kibana because not needed modify build flag to run as unit test add file tree test to unit tests add ? for test env * go to version 2 * switch to 2.1
- Loading branch information
1 parent
4e9f33b
commit 3bb5cb6
Showing
7 changed files
with
65 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM golang:1.9.2 | ||
MAINTAINER Nicolas Ruflin <ruflin@elastic.co> | ||
|
||
RUN set -x && \ | ||
apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
netcat python-pip virtualenv && \ | ||
apt-get clean | ||
|
||
RUN pip install --upgrade setuptools | ||
|
||
# Setup work environment | ||
ENV AUDITBEAT_PATH /go/src/github.com/elastic/beats/auditbeat | ||
|
||
RUN mkdir -p $AUDITBEAT_PATH/build/coverage | ||
WORKDIR $AUDITBEAT_PATH | ||
HEALTHCHECK CMD exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
version: '2.1' | ||
services: | ||
beat: | ||
build: ${PWD}/. | ||
depends_on: | ||
- proxy_dep | ||
env_file: | ||
- ${PWD}/build/test.env | ||
working_dir: /go/src/github.com/elastic/beats/auditbeat | ||
volumes: | ||
- ${PWD}/..:/go/src/github.com/elastic/beats/ | ||
command: make | ||
|
||
# This is a proxy used to block beats until all services are healthy. | ||
# See: https://github.com/docker/compose/issues/4369 | ||
proxy_dep: | ||
image: busybox | ||
depends_on: | ||
elasticsearch: { condition: service_healthy } | ||
|
||
elasticsearch: | ||
extends: | ||
file: ../testing/environments/${TESTING_ENVIRONMENT}.yml | ||
service: elasticsearch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
// +build !integration | ||
|
||
package monitor | ||
|
||
import ( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
// +build !integration | ||
|
||
package monitor | ||
|
||
import ( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
import os | ||
import sys | ||
|
||
sys.path.append('../../../libbeat/tests/system') | ||
from beat.beat import TestCase | ||
sys.path.append('../../../metricbeat/tests/system') | ||
from metricbeat import BaseTest as MetricbeatTest | ||
|
||
|
||
class BaseTest(TestCase): | ||
class BaseTest(MetricbeatTest): | ||
@classmethod | ||
def setUpClass(self): | ||
self.beat_name = "auditbeat" | ||
self.beat_path = os.path.abspath( | ||
os.path.join(os.path.dirname(__file__), "../../")) | ||
super(BaseTest, self).setUpClass() | ||
super(MetricbeatTest, self).setUpClass() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters