Skip to content

Commit fab2f84

Browse files
committed
chore(ci): add victoriametrics sink integration tests
Run the `victoriametrics` sink integration tests against single-node VictoriaMetrics, a vmstorage/vminsert/vmselect cluster, and vmauth routing bearer tokens to tenants.
1 parent 4b47015 commit fab2f84

6 files changed

Lines changed: 66 additions & 0 deletions

File tree

‎.github/workflows/changes.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ on:
140140
value: ${{ jobs.int_tests.outputs.redis }}
141141
splunk:
142142
value: ${{ jobs.int_tests.outputs.splunk }}
143+
victoriametrics:
144+
value: ${{ jobs.int_tests.outputs.victoriametrics }}
143145
webhdfs:
144146
value: ${{ jobs.int_tests.outputs.webhdfs }}
145147
# e2e tests
@@ -375,6 +377,7 @@ jobs:
375377
pulsar: ${{ steps.filter.outputs.pulsar }}
376378
redis: ${{ steps.filter.outputs.redis }}
377379
splunk: ${{ steps.filter.outputs.splunk }}
380+
victoriametrics: ${{ steps.filter.outputs.victoriametrics }}
378381
webhdfs: ${{ steps.filter.outputs.webhdfs }}
379382
any: ${{ steps.detect-changes.outputs.any }}
380383
steps:
@@ -441,6 +444,7 @@ jobs:
441444
"pulsar": ${{ steps.filter.outputs.pulsar }},
442445
"redis": ${{ steps.filter.outputs.redis }},
443446
"splunk": ${{ steps.filter.outputs.splunk }},
447+
"victoriametrics": ${{ steps.filter.outputs.victoriametrics }},
444448
"webhdfs": ${{ steps.filter.outputs.webhdfs }}
445449
}
446450
EOF

‎.github/workflows/ci-integration-review.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ jobs:
141141
"pulsar",
142142
"redis",
143143
"splunk",
144+
"victoriametrics",
144145
"webhdfs"
145146
]
146147
steps:

‎.github/workflows/integration.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ jobs:
133133
"pulsar",
134134
"redis",
135135
"splunk",
136+
"victoriametrics",
136137
"webhdfs"
137138
]
138139
timeout-minutes: 90
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
version: "3"
2+
3+
services:
4+
victoriametrics:
5+
image: docker.io/victoriametrics/victoria-metrics:${CONFIG_VERSION}
6+
vmstorage:
7+
image: docker.io/victoriametrics/vmstorage:${CONFIG_VERSION}-cluster
8+
vminsert:
9+
image: docker.io/victoriametrics/vminsert:${CONFIG_VERSION}-cluster
10+
command:
11+
- -storageNode=vmstorage:8400
12+
depends_on:
13+
- vmstorage
14+
vmselect:
15+
image: docker.io/victoriametrics/vmselect:${CONFIG_VERSION}-cluster
16+
command:
17+
- -storageNode=vmstorage:8401
18+
depends_on:
19+
- vmstorage
20+
vmauth:
21+
image: docker.io/victoriametrics/vmauth:${CONFIG_VERSION}
22+
command:
23+
- -auth.config=/etc/vmauth/auth.yaml
24+
volumes:
25+
- ../data/vmauth.yaml:/etc/vmauth/auth.yaml:ro
26+
depends_on:
27+
- vminsert
28+
29+
networks:
30+
default:
31+
name: ${VECTOR_NETWORK}
32+
external: true
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
features:
2+
- victoriametrics-integration-tests
3+
4+
test_filter: "::victoriametrics::"
5+
6+
env:
7+
VICTORIAMETRICS_ADDRESS: http://victoriametrics:8428
8+
VMINSERT_ADDRESS: http://vminsert:8480
9+
VMSELECT_ADDRESS: http://vmselect:8481
10+
VMSTORAGE_ADDRESS: http://vmstorage:8482
11+
VMAUTH_ADDRESS: http://vmauth:8427
12+
13+
matrix:
14+
version: ["v1.127.0"]
15+
16+
# changes to these files/paths will invoke the integration test in CI
17+
# expressions are evaluated using https://github.com/micromatch/picomatch
18+
paths:
19+
- "src/internal_events/victoriametrics.rs"
20+
- "src/sinks/victoriametrics/**"
21+
- "src/sinks/util/**"
22+
- "tests/integration/victoriametrics/**"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Each credential routes to its own vminsert tenant.
2+
users:
3+
- bearer_token: "tenant-1-token"
4+
url_prefix: "http://vminsert:8480/insert/1/prometheus"
5+
- bearer_token: "tenant-2-token"
6+
url_prefix: "http://vminsert:8480/insert/2/prometheus"

0 commit comments

Comments
 (0)