Skip to content
This repository was archived by the owner on Nov 7, 2025. It is now read-only.

Commit 0fd545e

Browse files
authored
Adding some integration tests (#876)
These should really boost our confidence when making changes, esp. w.r.t routing and configuration (but not only of course 😉) Full suite run on GitHub CI lasts <4 minutes. Locally <2 minutes given all the images are available.
1 parent c882d31 commit 0fd545e

8 files changed

+648
-4
lines changed

.github/workflows/integration-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
with:
5858
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
5959
slack-message: |
60-
:exclamation: *Integration tests failed.* :exclamation: @channel
60+
:exclamation: *Integration tests failed.* :exclamation: <!channel>
6161
Last commit by: ${{ steps.get_author.outputs.author }}
6262
env:
6363
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
frontendConnectors:
2+
- name: elastic-ingest
3+
type: elasticsearch-fe-ingest
4+
config:
5+
listenPort: 8080
6+
- name: elastic-query
7+
type: elasticsearch-fe-query
8+
config:
9+
listenPort: 8080
10+
backendConnectors:
11+
- name: e
12+
type: elasticsearch
13+
config:
14+
url: "http://{{ .elasticsearch_host }}:{{ .elasticsearch_port }}"
15+
user: elastic
16+
password: quesmaquesma
17+
- name: c
18+
type: clickhouse-os
19+
config:
20+
url: clickhouse://{{ .clickhouse_host }}:{{ .clickhouse_port }}
21+
ingestStatistics: true
22+
processors:
23+
- name: QP
24+
type: quesma-v1-processor-query
25+
config:
26+
indexes:
27+
logs-1:
28+
target: [ e ]
29+
logs-2:
30+
target: [ c ]
31+
logs-3:
32+
target: [ c, e ]
33+
logs-dual-query:
34+
target: [ c, e ]
35+
logs-4:
36+
useCommonTable: true
37+
target: [ c ]
38+
logs-5:
39+
useCommonTable: true
40+
target: [ c ]
41+
"*":
42+
target: [ e ]
43+
- name: IP
44+
type: quesma-v1-processor-ingest
45+
config:
46+
indexes:
47+
logs-1:
48+
target: [ e ]
49+
logs-2:
50+
target: [ c ]
51+
logs-3:
52+
target: [ c, e ]
53+
logs-dual-query:
54+
target: [ c, e ]
55+
logs-4:
56+
useCommonTable: true
57+
target: [ c ]
58+
"*":
59+
target: [ e ]
60+
logs-5:
61+
useCommonTable: true
62+
target: [ ]
63+
64+
pipelines:
65+
- name: my-elasticsearch-proxy-read
66+
frontendConnectors: [ elastic-query ]
67+
processors: [ QP ]
68+
backendConnectors: [ e, c ]
69+
- name: my-elasticsearch-proxy-write
70+
frontendConnectors: [ elastic-ingest ]
71+
processors: [ IP ]
72+
backendConnectors: [ e, c ]
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
frontendConnectors:
2+
- name: elastic-ingest
3+
type: elasticsearch-fe-ingest
4+
config:
5+
listenPort: 8080
6+
- name: elastic-query
7+
type: elasticsearch-fe-query
8+
config:
9+
listenPort: 8080
10+
backendConnectors:
11+
- name: my-minimal-elasticsearch
12+
type: elasticsearch
13+
config:
14+
url: "http://{{ .elasticsearch_host }}:{{ .elasticsearch_port }}"
15+
user: elastic
16+
password: quesmaquesma
17+
- name: my-hydrolix-instance
18+
type: clickhouse-os
19+
config:
20+
url: clickhouse://{{ .clickhouse_host }}:{{ .clickhouse_port }}
21+
ingestStatistics: true
22+
processors:
23+
- name: my-query-processor
24+
type: quesma-v1-processor-query
25+
config:
26+
indexes:
27+
siem:
28+
target: [my-hydrolix-instance]
29+
logs:
30+
target: [my-hydrolix-instance]
31+
test_index:
32+
target: [my-minimal-elasticsearch]
33+
"*":
34+
target: [ my-minimal-elasticsearch ]
35+
- name: my-ingest-processor
36+
type: quesma-v1-processor-ingest
37+
config:
38+
indexes:
39+
test_index:
40+
target: [ my-minimal-elasticsearch ]
41+
logs_disabled:
42+
target: [ ]
43+
"*":
44+
target: [ my-minimal-elasticsearch ]
45+
pipelines:
46+
- name: my-elasticsearch-proxy-read
47+
frontendConnectors: [ elastic-query ]
48+
processors: [ my-query-processor ]
49+
backendConnectors: [ my-minimal-elasticsearch, my-hydrolix-instance ]
50+
- name: my-elasticsearch-proxy-write
51+
frontendConnectors: [ elastic-ingest ]
52+
processors: [ my-ingest-processor ]
53+
backendConnectors: [ my-minimal-elasticsearch, my-hydrolix-instance ]
54+

ci/it/integration_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,13 @@ func TestReadingClickHouseTablesIntegrationTestcase(t *testing.T) {
2626
testCase := testcases.NewReadingClickHouseTablesIntegrationTestcase()
2727
runIntegrationTest(t, testCase)
2828
}
29+
30+
func TestQueryAndIngestPipelineTestcase(t *testing.T) {
31+
testCase := testcases.NewQueryAndIngestPipelineTestcase()
32+
runIntegrationTest(t, testCase)
33+
}
34+
35+
func TestDualWriteAndCommonTableTestcase(t *testing.T) {
36+
testCase := testcases.NewDualWriteAndCommonTableTestcase()
37+
runIntegrationTest(t, testCase)
38+
}

0 commit comments

Comments
 (0)