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

Adding some integration tests #876

Merged
merged 9 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
with:
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
slack-message: |
:exclamation: *Integration tests failed.* :exclamation: @channel
:exclamation: *Integration tests failed.* :exclamation: <!channel>
Last commit by: ${{ steps.get_author.outputs.author }}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
frontendConnectors:
- name: elastic-ingest
type: elasticsearch-fe-ingest
config:
listenPort: 8080
- name: elastic-query
type: elasticsearch-fe-query
config:
listenPort: 8080
backendConnectors:
- name: e
type: elasticsearch
config:
url: "http://{{ .elasticsearch_host }}:{{ .elasticsearch_port }}"
user: elastic
password: quesmaquesma
- name: c
type: clickhouse-os
config:
url: clickhouse://{{ .clickhouse_host }}:{{ .clickhouse_port }}
ingestStatistics: true
processors:
- name: QP
type: quesma-v1-processor-query
config:
indexes:
logs-1:
target: [ e ]
logs-2:
target: [ c ]
logs-3:
target: [ c, e ]
logs-dual-query:
target: [ c, e ]
logs-4:
useCommonTable: true
target: [ c ]
logs-5:
useCommonTable: true
target: [ c ]
"*":
target: [ e ]
- name: IP
type: quesma-v1-processor-ingest
config:
indexes:
logs-1:
target: [ e ]
logs-2:
target: [ c ]
logs-3:
target: [ c, e ]
logs-dual-query:
target: [ c, e ]
logs-4:
useCommonTable: true
target: [ c ]
"*":
target: [ e ]
logs-5:
useCommonTable: true
target: [ ]

pipelines:
- name: my-elasticsearch-proxy-read
frontendConnectors: [ elastic-query ]
processors: [ QP ]
backendConnectors: [ e, c ]
- name: my-elasticsearch-proxy-write
frontendConnectors: [ elastic-ingest ]
processors: [ IP ]
backendConnectors: [ e, c ]
54 changes: 54 additions & 0 deletions ci/it/configs/quesma-with-two-pipelines.yml.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
frontendConnectors:
- name: elastic-ingest
type: elasticsearch-fe-ingest
config:
listenPort: 8080
- name: elastic-query
type: elasticsearch-fe-query
config:
listenPort: 8080
backendConnectors:
- name: my-minimal-elasticsearch
type: elasticsearch
config:
url: "http://{{ .elasticsearch_host }}:{{ .elasticsearch_port }}"
user: elastic
password: quesmaquesma
- name: my-hydrolix-instance
type: clickhouse-os
config:
url: clickhouse://{{ .clickhouse_host }}:{{ .clickhouse_port }}
ingestStatistics: true
processors:
- name: my-query-processor
type: quesma-v1-processor-query
config:
indexes:
siem:
target: [my-hydrolix-instance]
logs:
target: [my-hydrolix-instance]
test_index:
target: [my-minimal-elasticsearch]
"*":
target: [ my-minimal-elasticsearch ]
- name: my-ingest-processor
type: quesma-v1-processor-ingest
config:
indexes:
test_index:
target: [ my-minimal-elasticsearch ]
logs_disabled:
target: [ ]
"*":
target: [ my-minimal-elasticsearch ]
pipelines:
- name: my-elasticsearch-proxy-read
frontendConnectors: [ elastic-query ]
processors: [ my-query-processor ]
backendConnectors: [ my-minimal-elasticsearch, my-hydrolix-instance ]
- name: my-elasticsearch-proxy-write
frontendConnectors: [ elastic-ingest ]
processors: [ my-ingest-processor ]
backendConnectors: [ my-minimal-elasticsearch, my-hydrolix-instance ]

10 changes: 10 additions & 0 deletions ci/it/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,13 @@ func TestReadingClickHouseTablesIntegrationTestcase(t *testing.T) {
testCase := testcases.NewReadingClickHouseTablesIntegrationTestcase()
runIntegrationTest(t, testCase)
}

func TestQueryAndIngestPipelineTestcase(t *testing.T) {
testCase := testcases.NewQueryAndIngestPipelineTestcase()
runIntegrationTest(t, testCase)
}

func TestDualWriteAndCommonTableTestcase(t *testing.T) {
testCase := testcases.NewDualWriteAndCommonTableTestcase()
runIntegrationTest(t, testCase)
}
Loading
Loading