Skip to content
This repository was archived by the owner on Dec 14, 2022. It is now read-only.

Commit 8c4a5b5

Browse files
author
Chris Wiechmann
committed
Adding filebeatVersion to logstash tests
1 parent e54feb2 commit 8c4a5b5

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

apibuilder4elastic/test/versionCheck/testVersionCheck.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,16 @@ describe('Endpoints', function () {
5959
expect(body.message).to.equal(`Filebeat and Logstash version okay`);
6060
expect(body.versionStatus).to.equal(`ok`);
6161
});
62+
});
63+
64+
it('[Check-Version-0004] Should return 400 if parameters are missing', () => {
65+
return requestAsync({
66+
method: 'GET',
67+
uri: `http://localhost:${server.apibuilder.port}/api/elk/v1/api/version/check`,
68+
json: true
69+
}).then(({ response, body }) => {
70+
expect(response.statusCode).to.equal(400);
71+
});
6272
});
6373
});
6474
});

filebeat/filebeat.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ filebeat.inputs:
1515
logtype: openlog
1616
gatewayName: ${GATEWAY_NAME:"API-Gateway"}
1717
gatewayRegion: ${GATEWAY_REGION:"N/A"}
18-
filebeatVersion: "2"
18+
filebeatVersion: 2
1919

2020
- type: log
2121
paths: ["/var/log/trace/*.trc"]
@@ -30,7 +30,7 @@ filebeat.inputs:
3030
logtype: trace
3131
gatewayName: ${GATEWAY_NAME:"API-Gateway"}
3232
gatewayRegion: ${GATEWAY_REGION:"N/A"}
33-
filebeatVersion: "2"
33+
filebeatVersion: 2
3434

3535
- type: log
3636
paths: ["/var/log/events/*.log", "/var/log/events/processed/*.log.PROCESSED"]
@@ -42,7 +42,7 @@ filebeat.inputs:
4242
logtype: events
4343
gatewayName: ${GATEWAY_NAME:"API-Gateway"}
4444
gatewayRegion: ${GATEWAY_REGION:"N/A"}
45-
filebeatVersion: "2"
45+
filebeatVersion: 2
4646

4747
- type: log
4848
paths: ["/var/log/audit/*.log"]
@@ -54,7 +54,7 @@ filebeat.inputs:
5454
logtype: domainaudit
5555
gatewayName: ${GATEWAY_NAME:"API-Gateway"}
5656
gatewayRegion: ${GATEWAY_REGION:"N/A"}
57-
filebeatVersion: "2"
57+
filebeatVersion: 2
5858

5959
# Required for Trace-Messages logged by the API-Gateway
6060
processors:

logstash/test/beatsInput/test-index-creation-lookup.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"fields": {
33
"gatewayName": "API-Gateway 1",
44
"gatewayRegion": "EU",
5+
"filebeatVersion": 2,
56
"logtype": "trace",
67
"integrationTest": "true"
78
},

0 commit comments

Comments
 (0)