Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
4223c70
Add environment manager for amqp
ofek Nov 16, 2022
2f00d13
Add environment manager for apex
ofek Nov 16, 2022
c79303b
Add environment manager for aws
ofek Nov 16, 2022
3f83f3f
Add environment manager for axiom
ofek Nov 16, 2022
857c27f
Add environment manager for azure
ofek Nov 16, 2022
b3673a9
Add environment manager for chronicle
ofek Nov 16, 2022
45d8b09
Add environment manager for clickhouse
ofek Nov 16, 2022
93759cb
Add environment manager for datadog-agent
ofek Nov 16, 2022
3e047ca
Add environment manager for datadog-traces
ofek Nov 16, 2022
6cf3410
Add environment manager for elasticsearch
ofek Nov 16, 2022
b12d249
Add environment manager for eventstoredb
ofek Nov 16, 2022
6b0653f
Add environment manager for gcp
ofek Nov 16, 2022
20c3a0d
Add environment manager for http-client
ofek Nov 16, 2022
0ff0fd5
Add environment manager for humio
ofek Nov 16, 2022
4cdabee
Add environment manager for influxdb
ofek Nov 16, 2022
7de9491
Add environment manager for kafka
ofek Nov 16, 2022
6a1832f
Add environment manager for logstash
ofek Nov 16, 2022
237cda0
Add environment manager for loki
ofek Nov 16, 2022
ddad62f
Add environment manager for mongodb
ofek Nov 16, 2022
97bf575
Add environment manager for nats
ofek Nov 16, 2022
6b14698
Add environment manager for nginx
ofek Nov 16, 2022
6b58c30
Add environment manager for opentelemetry
ofek Nov 16, 2022
98f7af5
Add environment manager for postgres
ofek Nov 16, 2022
2db1478
Add environment manager for prometheus
ofek Nov 16, 2022
5120c63
Add environment manager for pulsar
ofek Nov 16, 2022
4aaa9a2
Add environment manager for redis
ofek Nov 16, 2022
7bf5508
Add environment manager for shutdown
ofek Nov 16, 2022
28fdc47
Add environment manager for splunk
ofek Nov 16, 2022
b7bcb50
Merge remote-tracking branch 'ofek/vdev-testing-amqp' into vdev-integ…
bruceg Jan 10, 2023
0320bc1
Merge remote-tracking branch 'ofek/vdev-testing-apex' into vdev-integ…
bruceg Jan 10, 2023
ca04ec9
Merge remote-tracking branch 'ofek/vdev-testing-aws' into vdev-integr…
bruceg Jan 10, 2023
7acff66
Merge remote-tracking branch 'ofek/vdev-testing-axiom' into vdev-inte…
bruceg Jan 10, 2023
e35a7e2
Merge remote-tracking branch 'ofek/vdev-testing-azure' into vdev-inte…
bruceg Jan 10, 2023
37fb084
Merge remote-tracking branch 'ofek/vdev-testing-chronicle' into vdev-…
bruceg Jan 10, 2023
611d34a
Merge remote-tracking branch 'ofek/vdev-testing-clickhouse' into vdev…
bruceg Jan 10, 2023
5b7b4cc
Merge remote-tracking branch 'ofek/vdev-testing-datadog-agent' into v…
bruceg Jan 10, 2023
fb4d5dc
Merge remote-tracking branch 'ofek/vdev-testing-datadog-traces' into …
bruceg Jan 10, 2023
5847182
Merge remote-tracking branch 'ofek/vdev-testing-elasticsearch' into v…
bruceg Jan 10, 2023
3d4d57a
Merge remote-tracking branch 'ofek/vdev-testing-eventstoredb' into vd…
bruceg Jan 10, 2023
b9b43a5
Merge remote-tracking branch 'ofek/vdev-testing-gcp' into vdev-integr…
bruceg Jan 10, 2023
98c0879
Merge remote-tracking branch 'ofek/vdev-testing-http-client' into vde…
bruceg Jan 10, 2023
934a151
Merge remote-tracking branch 'ofek/vdev-testing-humio' into vdev-inte…
bruceg Jan 10, 2023
bb187f6
Merge remote-tracking branch 'ofek/vdev-testing-influxdb' into vdev-i…
bruceg Jan 10, 2023
d6d85c1
Merge remote-tracking branch 'ofek/vdev-testing-kafka' into vdev-inte…
bruceg Jan 10, 2023
9095f10
Merge remote-tracking branch 'ofek/vdev-testing-logstash' into vdev-i…
bruceg Jan 10, 2023
8ec0a74
Merge remote-tracking branch 'ofek/vdev-testing-loki' into vdev-integ…
bruceg Jan 10, 2023
d7fa420
Merge remote-tracking branch 'ofek/vdev-testing-mongodb' into vdev-in…
bruceg Jan 10, 2023
410d232
Merge remote-tracking branch 'ofek/vdev-testing-nats' into vdev-integ…
bruceg Jan 10, 2023
3a32568
Merge remote-tracking branch 'ofek/vdev-testing-nginx' into vdev-inte…
bruceg Jan 10, 2023
a8d2f9f
Merge remote-tracking branch 'ofek/vdev-testing-opentelemetry' into v…
bruceg Jan 10, 2023
780dd0a
Merge remote-tracking branch 'ofek/vdev-testing-postgres' into vdev-i…
bruceg Jan 10, 2023
fa888b4
Merge remote-tracking branch 'ofek/vdev-testing-prometheus' into vdev…
bruceg Jan 10, 2023
1e37bdc
Merge remote-tracking branch 'ofek/vdev-testing-pulsar' into vdev-int…
bruceg Jan 10, 2023
1b23e62
Merge remote-tracking branch 'ofek/vdev-testing-redis' into vdev-inte…
bruceg Jan 10, 2023
7d31f87
Merge remote-tracking branch 'ofek/vdev-testing-shutdown' into vdev-i…
bruceg Jan 10, 2023
d2f1a31
Merge remote-tracking branch 'ofek/vdev-testing-splunk' into vdev-int…
bruceg Jan 10, 2023
8aea454
Fix integration test matrix data
bruceg Jan 6, 2023
2b287a0
Merge all the integration tests into a common `bin` directory
bruceg Jan 6, 2023
ebe8b69
Merge all the main routines into a library
bruceg Jan 6, 2023
900b205
Merge all the core libraries into the main lib
bruceg Jan 6, 2023
6f0df4d
Move all integration manager bins into one program
bruceg Jan 6, 2023
b3ff05d
Flatten out docker-compose files and bail on canonicalization error
bruceg Jan 6, 2023
c61341c
Integration integration manager into vdev
bruceg Jan 6, 2023
715e356
Convert integration test state functions into a struct
bruceg Jan 10, 2023
7d26ed5
Merge remote-tracking branch 'origin/master' into vdev-integrations
bruceg Jan 16, 2023
7b70cb6
Refactor testing config types
bruceg Jan 16, 2023
ed68c96
Move integration test running into library
bruceg Jan 16, 2023
146c134
Use `collect_all` function to provide integration test versions
bruceg Jan 16, 2023
8fd04e9
Allow use of podman-compose using CONTAINER_TOOL
bruceg Jan 16, 2023
28eedf4
Fix version environment variable name
bruceg Jan 16, 2023
3d0a090
Rename the `docker-compose.yml` files to `compose.yaml` as per spec
bruceg Jan 16, 2023
610665f
Refactor integration test running compose into struct
bruceg Jan 16, 2023
286ad41
Fix running integration tests with podman
bruceg Jan 17, 2023
79bfba2
Remove unneeded README files
bruceg Jan 17, 2023
b3ec265
Fix obsolete image name in aws integration compose file
bruceg Jan 17, 2023
5ead9c1
Tiny refactor
bruceg Jan 17, 2023
1409279
Merge remote-tracking branch 'origin/master' into bruceg/vdev-integra…
bruceg Jan 17, 2023
e7b2194
Merge remote-tracking branch 'origin/master' into bruceg/vdev-integra…
bruceg Jan 17, 2023
9b71e73
Merge remote-tracking branch 'origin/master' into bruceg/vdev-integra…
bruceg Jan 20, 2023
3f24e01
Fix integration test relative paths
bruceg Jan 20, 2023
a984ff1
Refactor main test subcommand
bruceg Jan 20, 2023
7ecd0aa
Only list integration directories that have a config file
bruceg Jan 21, 2023
210e228
Show active environments in the compact integration listing
bruceg Jan 21, 2023
9aa3292
Let `vdev integration stop` stop all environments
bruceg Jan 23, 2023
4b92ae3
Merge remote-tracking branch 'origin/master' into bruceg/vdev-integra…
bruceg Jan 23, 2023
5bd90f7
Remove accidentally committed file
bruceg Jan 23, 2023
662e7da
Add a README for the integration test files
bruceg Jan 23, 2023
a6deb86
Merge remote-tracking branch 'origin/master' into bruceg/vdev-integra…
bruceg Jan 23, 2023
f34af02
Fix README formatting
bruceg Jan 23, 2023
6363d85
Drop unused network reference in aws integration
bruceg Jan 24, 2023
250e982
Simplify path to chronicle pub key
bruceg Jan 24, 2023
b95105b
Add header to the `integration show` output
bruceg Jan 24, 2023
69a083b
Clarify README
bruceg Jan 24, 2023
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
28 changes: 0 additions & 28 deletions scripts/integration/DIRS

This file was deleted.

31 changes: 31 additions & 0 deletions scripts/integration/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
This directory contains a set of integration test frameworks for vector which are executed by the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noting that I believe the removed DIRS file above was accidentally committed, @bruceg to confirm though!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. I had created the file just for a convenience when running for loops over the tests.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 leaving this open for other reviewers

`vdev` tool.

Each directory contains two files:

1. A `compose.yaml` file containing the instructions to `docker-compose` or `podman-compose` for how
to set up the containers in which to run the integrations, and
2. A `test.yaml` file that describes how to run the integration tests, including a matrix of
software versions or other parameters over which the tests will be run.

You can list these tests with `cargo vdev integration show`[1], which provides a list of all the
integration test names followed by the extrapolated matrix of environments.

Each test can be run using one of the following:

1. Run a single test environment from the above list with `cargo vdev integration test NAME ENV`
2. Run all the environments for one test with `cargo vdev integration test NAME`
3. Run all the steps individually using the `start`, `test`, and then `stop` subcommands with the
same parameters as above (see below). This allows developers to start the environment once and
then repeat the testing step while working on a component.

```shell
cargo vdev integration start NAME ENVIRONMENT
cargo vdev integration test NAME [ENVIRONMENT]
cargo vdev integration stop NAME [ENVIRONMENT]
```

If no environment is named for the `test` and `stop` subcommands, all active environments are used.

[1] Note that the `vdev` tool accepts abbreviated subcommand names, so this can also be run as
`cargo vdev int show` for brevity.
12 changes: 12 additions & 0 deletions scripts/integration/amqp/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: '3'

services:
rabbitmq:
image: docker.io/rabbitmq:${AMQP_VERSION}
ports:
- 5672:5672

networks:
default:
name: ${VECTOR_NETWORK}
external: true
8 changes: 8 additions & 0 deletions scripts/integration/amqp/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
args:
- --features
- amqp-integration-tests
- --lib
- '::amqp::'

matrix:
- version: ['3.8']
14 changes: 14 additions & 0 deletions scripts/integration/apex/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: '3'

services:
mock-apex:
image: mcasper/mock-apex:${APEX_VERSION}
environment:
- MOCK_API_TOKEN=token
ports:
- '4567'

networks:
default:
name: ${VECTOR_NETWORK}
external: true
11 changes: 11 additions & 0 deletions scripts/integration/apex/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
args:
- --features
- apex-integration-tests
- --lib
- '::apex::'

env:
MOCK_APEX_ADDRESS: http://mock-apex:4567

matrix:
- version: [latest]
21 changes: 21 additions & 0 deletions scripts/integration/aws/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: '3'

services:
mock-ec2-metadata:
image: public.ecr.aws/aws-ec2/amazon-ec2-metadata-mock:v1.11.2
mock-localstack:
image: docker.io/localstack/localstack-full:0.11.6
environment:
- SERVICES=kinesis,s3,cloudwatch,elasticsearch,es,firehose,sqs
mock-watchlogs:
image: docker.io/luciofranco/mockwatchlogs:latest
mock-ecs:
image: docker.io/amazon/amazon-ecs-local-container-endpoints:latest
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- $HOME/.aws/:/home/.aws/

networks:
default:
name: ${VECTOR_NETWORK}
external: true
20 changes: 20 additions & 0 deletions scripts/integration/aws/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
args:
- --features
- aws-integration-tests
- --lib
- ::aws_

env:
AWS_ACCESS_KEY_ID: dummy
AWS_SECRET_ACCESS_KEY: dummy
CLOUDWATCH_ADDRESS: http://mock-localstack:4566
EC2_METADATA_ADDRESS: http://mock-ec2-metadata:8111
ECS_ADDRESS: http://mock-ecs
ELASTICSEARCH_ADDRESS: http://mock-localstack:4571
KINESIS_ADDRESS: http://mock-localstack:4566
S3_ADDRESS: http://mock-localstack:4566
SQS_ADDRESS: http://mock-localstack:4566
WATCHLOGS_ADDRESS: http://mock-watchlogs:6000

matrix:
- version: [latest]
34 changes: 34 additions & 0 deletions scripts/integration/axiom/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
version: '3'

services:
postgres:
image: postgres:${AXIOM_VERSION}
environment:
POSTGRES_USER: axiom
POSTGRES_PASSWORD: axiom
volumes:
- postgres_data:/var/lib/postgresql/data
axiom-db:
image: axiomhq/axiom-db:latest
restart: unless-stopped
environment:
AXIOM_STORAGE: file:///data
AXIOM_POSTGRES_URL: postgres://axiom:axiom@postgres?sslmode=disable&connect_timeout=5
depends_on:
- postgres
axiom-core:
image: axiomhq/axiom-core:latest
restart: unless-stopped
environment:
AXIOM_POSTGRES_URL: postgres://axiom:axiom@postgres?sslmode=disable&connect_timeout=5
AXIOM_DB_URL: http://axiom-db:8080
AXIOM_HTTP_PORT: '80'
depends_on:
- axiom-db
ports:
- 8081:80

networks:
default:
name: ${VECTOR_NETWORK}
external: true
11 changes: 11 additions & 0 deletions scripts/integration/axiom/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
args:
- --features
- axiom-integration-tests
- --lib
- 'sinks::axiom::'

env:
AXIOM_URL: http://axiom-core

matrix:
- version: [13-alpine]
13 changes: 13 additions & 0 deletions scripts/integration/azure/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: '3'

services:
local-azure-blob:
image: mcr.microsoft.com/azure-storage/azurite:${AZURE_VERSION}
command: azurite --blobHost 0.0.0.0 --loose
volumes:
- /var/run:/var/run

networks:
default:
name: ${VECTOR_NETWORK}
external: true
13 changes: 13 additions & 0 deletions scripts/integration/azure/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
args:
- --features
- azure-integration-tests
- --lib
- ::azure_

env:
AZURE_ADDRESS: local-azure-blob
HEARTBEAT_ADDRESS: 0.0.0.0:8080
LOGSTASH_ADDRESS: 0.0.0.0:8081

matrix:
- version: [3.14.0]
17 changes: 17 additions & 0 deletions scripts/integration/chronicle/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: '3'

services:
chronicle-emulator:
image: docker.io/plork/chronicle-emulator:${CHRONICLE_VERSION}
ports:
- 3000:3000
volumes:
- ../chroniclepub.pem:/public.pem
command:
- -p
- /public.pem

networks:
default:
name: ${VECTOR_NETWORK}
external: true
11 changes: 11 additions & 0 deletions scripts/integration/chronicle/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
args:
- --features
- chronicle-integration-tests
- --lib
- '::chronicle_unstructured::'

env:
CHRONICLE_ADDRESS: http://chronicle-emulator:3000

matrix:
- version: [latest]
10 changes: 10 additions & 0 deletions scripts/integration/clickhouse/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: '3'

services:
clickhouse:
image: docker.io/yandex/clickhouse-server:${CLICKHOUSE_VERSION}

networks:
default:
name: ${VECTOR_NETWORK}
external: true
11 changes: 11 additions & 0 deletions scripts/integration/clickhouse/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
args:
- --features
- clickhouse-integration-tests
- --lib
- '::clickhouse::'

env:
CLICKHOUSE_ADDRESS: http://clickhouse:8123

matrix:
- version: ['19']
33 changes: 33 additions & 0 deletions scripts/integration/datadog-agent/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
version: '3'

services:
datadog-agent:
image: docker.io/datadog/agent:${DATADOG_AGENT_VERSION}
environment:
- DD_API_KEY=${TEST_DATADOG_API_KEY:?TEST_DATADOG_API_KEY required}
- DD_APM_ENABLED=false
- DD_LOGS_ENABLED=true
- DD_LOGS_CONFIG_LOGS_DD_URL=runner:8080
- DD_LOGS_CONFIG_LOGS_NO_SSL=true
- DD_LOGS_CONFIG_USE_HTTP=true
- DD_HEALTH_PORT=8182
- DD_CMD_PORT=5001
- DD_USE_DOGSTATSD=false
- DD_HOSTNAME=datadog-agent
volumes:
- ../../../tests/data/datadog-agent/conf.yaml:/etc/datadog-agent/conf.d/test.d/conf.yaml
datadog-trace-agent:
image: docker.io/datadog/agent:7.31.0
environment:
- DD_API_KEY=${TEST_DATADOG_API_KEY:?TEST_DATADOG_API_KEY required}
- DD_APM_ENABLED=true
- DD_APM_DD_URL=http://runner:8081
- DD_HEALTH_PORT=8183
- DD_CMD_PORT=5002
- DD_USE_DOGSTATSD=false
- DD_HOSTNAME=datadog-trace-agent

networks:
default:
name: ${VECTOR_NETWORK}
external: true
14 changes: 14 additions & 0 deletions scripts/integration/datadog-agent/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
args:
- --features
- datadog-agent-integration-tests
- --lib
- 'sources::datadog_agent::integration_tests::'

env:
AGENT_ADDRESS: datadog-agent:8181
AGENT_HEALTH_ADDRESS: http://datadog-agent:8182
TRACE_AGENT_HEALTH_ADDRESS: http://datadog-trace-agent:8183
TRACE_AGENT_URL: http://datadog-trace-agent:8126/v0.4/traces

matrix:
- version: ['7']
36 changes: 36 additions & 0 deletions scripts/integration/datadog-traces/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
version: '3'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find it interesting that this is separate from the agent test above, when it should be the same component?

@neuronull are there reasons we can't reduce these to a single test setup?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really clear on what the version field of the yaml file does. hmmm

But to the question of why there is a separate integration suite for datadog-traces, I think the main reason is that the agent service has different configurations for the datadog traces test.

Also, we would need to have separate args to nextest passed for the source vs sink .

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doh - sorry yeah, it wasn't specific to that version line 😂

It seemed like the other test was doing all "sources and sinks" that are Datadog (except for this trace one), I may have misread it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also a side note partially for myself- on my TODO list still is to update the scope of the integration test files to only run the integration tests.
I'll wait until after this is merged in for that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good plan, however most of these integration test configs do already run only a limited set of tests.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really clear on what the version field of the yaml file does. hmmm

The version field is the version of the compose standard to use.


services:
datadog-trace-agent:
image: docker.io/datadog/agent:${DATADOG_TRACES_VERSION}
environment:
- DD_API_KEY=${TEST_DATADOG_API_KEY:?TEST_DATADOG_API_KEY required}
- DD_APM_ENABLED=true
- DD_APM_DD_URL=http://runner:8082
- DD_HEALTH_PORT=8183
- DD_CMD_PORT=5002
- DD_USE_DOGSTATSD=false
- DD_APM_MAX_TPS=999999
- DD_APM_ERROR_TPS=999999
- DD_APM_MAX_MEMORY=0
- DD_APM_MAX_CPU_PERCENT=0
- DD_HOSTNAME=datadog-trace-agent
datadog-trace-agent-to-vector:
image: docker.io/datadog/agent:${DATADOG_TRACES_VERSION}
environment:
- DD_API_KEY=${TEST_DATADOG_API_KEY:?TEST_DATADOG_API_KEY required}
- DD_APM_ENABLED=true
- DD_APM_DD_URL=http://runner:8081
- DD_HEALTH_PORT=8183
- DD_CMD_PORT=5002
- DD_USE_DOGSTATSD=false
- DD_APM_MAX_TPS=999999
- DD_APM_ERROR_TPS=999999
- DD_APM_MAX_MEMORY=0
- DD_APM_MAX_CPU_PERCENT=0
- DD_HOSTNAME=datadog-trace-agent-to-vector

networks:
default:
name: ${VECTOR_NETWORK}
external: true
17 changes: 17 additions & 0 deletions scripts/integration/datadog-traces/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
args:
- --no-default-features
- --features
- datadog-traces-integration-tests
- --lib
- '::datadog::traces::'

env:
AGENT_PORT: '8082'
TEST_DATADOG_API_KEY: ${TEST_DATADOG_API_KEY:?TEST_DATADOG_API_KEY required}
TEST_LOG: ${TEST_LOG}
TRACE_AGENT_TO_VECTOR_URL: http://datadog-trace-agent-to-vector:8126/v0.3/traces
TRACE_AGENT_URL: http://datadog-trace-agent:8126/v0.3/traces
VECTOR_PORT: '8081'

matrix:
- version: [latest]
Loading