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

chore(tests): Add end-to-end tests with the Datadog Agent #18538

Merged
merged 130 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from 45 commits
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
a58ae6f
start
neuronull May 17, 2023
98b9712
check spelling allow
neuronull May 18, 2023
62211ab
reorg
neuronull May 18, 2023
ae1d41a
try consume a log
neuronull May 18, 2023
8edd7f4
trying on logs
neuronull May 22, 2023
136650f
Merge branch 'master' into neuronull/dd_e2e_infra_logs
neuronull Aug 31, 2023
7a69290
saving progress on vdev changes
neuronull Sep 5, 2023
758a06a
more vdev drafts
neuronull Sep 5, 2023
9396764
Revert "more vdev drafts"
neuronull Sep 5, 2023
7df74ba
Revert "saving progress on vdev changes"
neuronull Sep 5, 2023
f4b2f6c
extract Vector instance to its own container
neuronull Sep 6, 2023
90ac09b
cleanup the compose file
neuronull Sep 6, 2023
d95f708
Generate logs on fly
neuronull Sep 7, 2023
1cc6f8d
cleanup
neuronull Sep 7, 2023
6923875
cleanup
neuronull Sep 7, 2023
7400659
cleanup
neuronull Sep 7, 2023
a2ceff5
remove sleep
neuronull Sep 7, 2023
070c69e
add to CI
neuronull Sep 11, 2023
eb9f465
spell checker
neuronull Sep 11, 2023
a1c7f49
fix issue with DD changes detection
neuronull Sep 11, 2023
7b70ca1
more workflow fix
neuronull Sep 11, 2023
7dd26c8
increase timeout as experiment
neuronull Sep 11, 2023
9d9ba10
Merge branch 'master' into neuronull/dd_e2e_infra_logs
neuronull Sep 14, 2023
0dff9f9
update vector config for log endpoint field
neuronull Sep 14, 2023
c8c38d2
touch up
neuronull Sep 14, 2023
e522ded
start
neuronull Sep 14, 2023
d7592c6
CI
neuronull Sep 14, 2023
3631ddb
feedback bg
neuronull Sep 28, 2023
79248a3
Merge branch 'neuronull/dd_e2e_infra_logs' into neuronull/dd_e2e_metrics
neuronull Sep 28, 2023
d8891fd
add scaffolding for the differentiation of series API versions
neuronull Oct 2, 2023
91ca255
fix(datadog_metrics sink): fix the integration tests which weren't ac…
neuronull Oct 3, 2023
9afbd83
fix workflows
neuronull Oct 3, 2023
cc9cc2d
clippy
neuronull Oct 3, 2023
597305d
fix filter for traces
neuronull Oct 3, 2023
3f9cd72
add first pass
neuronull Oct 3, 2023
4e204c5
Merge branch 'neuronull/fix_datadog_metrics_sink_integration_tests' i…
neuronull Oct 3, 2023
3a96f18
add testing coverage
neuronull Oct 3, 2023
9923219
cargo.lock
neuronull Oct 3, 2023
4523fcd
reduce duplicated code
neuronull Oct 4, 2023
a87bf0c
cleanup
neuronull Oct 4, 2023
376da18
clippy
neuronull Oct 4, 2023
715cf22
Merge branch 'master' into neuronull/fix_datadog_metrics_sink_integra…
neuronull Oct 4, 2023
7117d98
Merge branch 'neuronull/fix_datadog_metrics_sink_integration_tests' i…
neuronull Oct 4, 2023
5912324
Merge branch 'master' into neuronull/sink_datadog_metrics_v2_series_e…
neuronull Oct 5, 2023
c95a326
feedback ds: remove check for sort by name
neuronull Oct 5, 2023
d73cfe0
feedback ds: extend unit tests for v2
neuronull Oct 5, 2023
c9c0fbc
feedback ds: extend the int test coverage
neuronull Oct 5, 2023
2ac5bbf
Revert "feedback ds: remove check for sort by name"
neuronull Oct 5, 2023
cb92dc5
add explicit sort check
neuronull Oct 5, 2023
96ef122
add env var for v1 support
neuronull Oct 5, 2023
2de3617
check events
neuronull Oct 5, 2023
b9181e0
add note in deprecations
neuronull Oct 6, 2023
4920c7c
Merge branch 'master' into neuronull/sink_datadog_metrics_v2_series_e…
neuronull Oct 10, 2023
69bafd0
feedback ds
neuronull Oct 10, 2023
8ff6763
Merge branch 'master' into neuronull/dd_e2e_infra_logs
neuronull Oct 10, 2023
45e78e5
Merge branch 'neuronull/dd_e2e_infra_logs' into neuronull/dd_e2e_metrics
neuronull Oct 10, 2023
7406730
ds feedback logs PR
neuronull Oct 10, 2023
d513eaf
Merge branch 'master' into neuronull/sink_datadog_metrics_v2_series_e…
neuronull Oct 10, 2023
90d9ca8
Merge branch 'neuronull/sink_datadog_metrics_v2_series_endpoint_conve…
neuronull Oct 10, 2023
b7451f5
config pain; start aggregation
neuronull Oct 11, 2023
b3b9cc7
feedback ds: move to scripts/e2e
neuronull Oct 12, 2023
106a927
add v6 and v7 agent versions to test against
neuronull Oct 12, 2023
d2fb10a
Merge branch 'master' into neuronull/dd_e2e_infra_logs
neuronull Oct 12, 2023
e7f3953
Merge branch 'neuronull/dd_e2e_infra_logs' into neuronull/dd_e2e_metrics
neuronull Oct 12, 2023
6f7d3b8
Merge branch 'neuronull/dd_e2e_metrics' into neuronull/dd_e2e_metrics…
neuronull Oct 12, 2023
244b9ed
remove dead code allow
neuronull Oct 12, 2023
f3db321
Merge branch 'neuronull/sink_datadog_metrics_v2_series_endpoint_conve…
neuronull Oct 12, 2023
cc35100
move to e2e dir
neuronull Oct 12, 2023
50f2988
improve comparison logic
neuronull Oct 12, 2023
e47a00e
Merge branch 'master' into neuronull/dd_e2e_metrics
neuronull Oct 13, 2023
15e9c83
Merge branch 'neuronull/dd_e2e_metrics' into neuronull/dd_e2e_metrics…
neuronull Oct 13, 2023
9705c12
code reduction
neuronull Oct 13, 2023
93ca197
add sketches, some reorg
neuronull Oct 13, 2023
5012f7f
Merge branch 'master' into neuronull/dd_e2e_infra_logs
neuronull Oct 13, 2023
2dd590a
Merge branch 'neuronull/dd_e2e_infra_logs' into neuronull/dd_e2e_metrics
neuronull Oct 13, 2023
c66de4f
cleanup
neuronull Oct 13, 2023
cde2a2d
add notes about the e2e prefix needed
neuronull Jan 9, 2024
bedb3d3
re-use runner image
neuronull Jan 10, 2024
aab2500
fixes
neuronull Jan 10, 2024
f13ef9d
Merge branch 'master' into neuronull/dd_e2e_infra_logs
neuronull Jan 10, 2024
e9474f7
e2e tests now run in CI
neuronull Jan 10, 2024
262821d
clippy
neuronull Jan 10, 2024
71a3f42
remove unused struct
neuronull Jan 10, 2024
9125574
Merge branch 'neuronull/dd_e2e_infra_logs' into neuronull/dd_e2e_metrics
neuronull Jan 10, 2024
0ef4238
Merge branch 'master' into neuronull/dd_e2e_metrics
neuronull Jan 12, 2024
2b14940
true up the int test comment changes
neuronull Jan 12, 2024
54fe46d
cleanup
neuronull Jan 12, 2024
48ec676
rework the massaging and comparison model
neuronull Jan 12, 2024
2d430ee
Merge branch 'master' into neuronull/dd_e2e_infra_logs
neuronull Jan 12, 2024
8a166d7
Merge branch 'neuronull/dd_e2e_infra_logs' into neuronull/dd_e2e_metrics
neuronull Jan 12, 2024
61d25be
compare to all versions
neuronull Jan 12, 2024
06277c2
cleanup and address TODO for sketches
neuronull Jan 16, 2024
2e0ff5a
feedback ds: workflows
neuronull Jan 16, 2024
19d9dfd
feedback ds: simpler compose
neuronull Jan 16, 2024
c0b3989
feedback ds: agent versions clarity
neuronull Jan 16, 2024
af7c2fb
feedback ds: comments
neuronull Jan 17, 2024
e7a4ca3
Merge branch 'master' into neuronull/dd_e2e_infra_logs
neuronull Jan 17, 2024
fe3c31e
Merge branch 'neuronull/dd_e2e_infra_logs' into neuronull/dd_e2e_metrics
neuronull Jan 17, 2024
aa19307
clippy
neuronull Jan 17, 2024
fb7fc57
touchups
neuronull Jan 17, 2024
4cf483e
feedback bg: assert_eq
neuronull Jan 17, 2024
d372567
increase timeout workflow
neuronull Jan 17, 2024
66006b7
run in 8 core runner
neuronull Jan 18, 2024
34c9f7f
check
neuronull Jan 18, 2024
61c5217
Merge branch 'neuronull/dd_e2e_infra_logs' into neuronull/dd_e2e_metrics
neuronull Jan 19, 2024
010d8ab
separate e2e workflow
neuronull Jan 22, 2024
ffc9d5d
comment
neuronull Jan 22, 2024
c0c2e2f
Merge branch 'neuronull/dd_e2e_infra_logs' into neuronull/dd_e2e_metrics
neuronull Jan 22, 2024
c33af87
fix workflows
neuronull Jan 22, 2024
b71cfcc
prune timing
neuronull Jan 23, 2024
ac56ba4
allow build_all option to start subcommand
neuronull Jan 23, 2024
83ecea0
Merge branch 'neuronull/dd_e2e_infra_logs' of github.com:vectordotdev…
neuronull Jan 23, 2024
97aa5a8
hack to bypass this temporary issue with CI
neuronull Jan 23, 2024
1e8bfb0
feedback bg
neuronull Jan 24, 2024
af5c4a9
feedback bg
neuronull Jan 24, 2024
c9d33d3
feedback ds: metric type check
neuronull Jan 26, 2024
031cdcc
add descriptive comment
neuronull Jan 30, 2024
773bb24
spelling
neuronull Jan 30, 2024
6da0b03
chore(vdev): refactor e2e tests into own subcommand (#19666)
neuronull Jan 30, 2024
ce73f67
Merge branch 'neuronull/dd_e2e_infra_logs' into neuronull/dd_e2e_metrics
neuronull Jan 30, 2024
34f9e7a
merge conflict
neuronull Jan 30, 2024
12318fb
update workflows
neuronull Jan 30, 2024
68d0fb7
rename
neuronull Jan 30, 2024
5820a0b
fix e2e logic
neuronull Jan 30, 2024
32e133c
fix e2e
neuronull Jan 30, 2024
f11099a
fix e2e
neuronull Jan 30, 2024
5933c06
script usage
neuronull Jan 30, 2024
731b278
touchups to workflows
neuronull Jan 31, 2024
87ffb7c
separate dockerfile for the e2e tests
neuronull Jan 31, 2024
81f2229
add the Dockerfile
neuronull Jan 31, 2024
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
1 change: 1 addition & 0 deletions .github/actions/spelling/allow.txt
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ downsides
downwardapi
emoji
esbuild
fakeintake
fargate
fibonacci
fileapi
Expand Down
1 change: 1 addition & 0 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ gnux
gny
Godbolt
gogoproto
gohai
goldberg
goldmark
GPB
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ on:
value: ${{ jobs.int_tests.outputs.datadog-metrics }}
datadog-traces:
value: ${{ jobs.int_tests.outputs.datadog-traces }}
e2e-datadog-logs:
value: ${{ jobs.int_tests.outputs.e2e-datadog-logs }}
dnstap:
value: ${{ jobs.int_tests.outputs.dnstap }}
docker-logs:
Expand Down Expand Up @@ -196,6 +198,7 @@ jobs:
datadog-logs: ${{ steps.filter.outputs.datadog-logs }}
datadog-metrics: ${{ steps.filter.outputs.datadog-metrics }}
datadog-traces: ${{ steps.filter.outputs.datadog-traces }}
e2e-datadog-logs: ${{ steps.filter.outputs.e2e-datadog-logs }}
dnstap: ${{ steps.filter.outputs.dnstap }}
docker-logs: ${{ steps.filter.outputs.docker-logs }}
elasticsearch: ${{ steps.filter.outputs.elasticsearch }}
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/integration-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,14 @@ jobs:
max_attempts: 3
command: bash scripts/ci-integration-test.sh datadog-traces

- name: e2e-datadog-logs
if: ${{ contains(github.event.comment.body, '/ci-run-integration-e2e-datadog-logs') || contains(github.event.comment.body, '/ci-run-all') }}
uses: nick-fields/retry@v2
with:
timeout_minutes: 35
max_attempts: 3
command: bash scripts/ci-integration-test.sh e2e-datadog-logs

- name: dnstap
if: ${{ contains(github.event.comment.body, '/ci-run-integration-dnstap')
|| contains(github.event.comment.body, '/ci-run-integration-all')
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jobs:
|| needs.changes.outputs.datadog-logs == 'true'
|| needs.changes.outputs.datadog-metrics == 'true'
|| needs.changes.outputs.datadog-traces == 'true'
|| needs.changes.outputs.e2e-datadog-logs == 'true'
|| needs.changes.outputs.dnstap == 'true'
|| needs.changes.outputs.docker-logs == 'true'
|| needs.changes.outputs.elasticsearch == 'true'
Expand Down Expand Up @@ -205,6 +206,15 @@ jobs:
max_attempts: 3
command: bash scripts/ci-integration-test.sh datadog-traces

- if: (github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.e2e-datadog-logs == 'true') &&
(github.event_name != 'pull_request' || env.PR_HAS_ACCESS_TO_SECRETS == 'true')
name: e2e-datadog-logs
uses: nick-fields/retry@v2
with:
timeout_minutes: 35
max_attempts: 3
command: bash scripts/ci-integration-test.sh e2e-datadog-logs

- if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.dnstap == 'true' }}
name: dnstap
uses: nick-fields/retry@v2
Expand Down
24 changes: 23 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ bench = false
name = "integration"
path = "tests/integration/lib.rs"

[[test]]
name = "e2e"
path = "tests/e2e/mod.rs"

[[bin]]
name = "graphql-schema"
path = "src/api/schema/gen.rs"
Expand Down Expand Up @@ -734,8 +738,15 @@ enterprise = [
# Identifies that the build is a nightly build
nightly = []

# Testing-related features
# Integration testing-related features
all-integration-tests = [
# TODO: This is a temporary solution. When this GH issue
# https://github.com/vectordotdev/vector/issues/18829 , is worked, we will refactor
# to have a separate vdev e2e subcommand, and we can then use "all-e2e-tests" in
# that subcommand's processing. Until then the e2e tests must be included here
# in order for them to be exercised in CI.
"all-e2e-tests",

"amqp-integration-tests",
"appsignal-integration-tests",
"aws-integration-tests",
Expand Down Expand Up @@ -840,6 +851,17 @@ webhdfs-integration-tests = ["sinks-webhdfs"]
disable-resolv-conf = []
shutdown-tests = ["api", "sinks-blackhole", "sinks-console", "sinks-prometheus", "sources", "transforms-lua", "transforms-remap", "unix"]
cli-tests = ["sinks-blackhole", "sinks-socket", "sources-demo_logs", "sources-file"]

# End-to-End testing-related features
all-e2e-tests = [
"e2e-tests-datadog"
]

e2e-tests-datadog = [
"sources-datadog_agent",
"sinks-datadog_logs"
]

vector-api-tests = [
"sources-demo_logs",
"transforms-log_to_metric",
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ test-integration: test-integration-databend test-integration-docker-logs test-in
test-integration: test-integration-eventstoredb test-integration-fluent test-integration-gcp test-integration-greptimedb test-integration-humio test-integration-http-client test-integration-influxdb
test-integration: test-integration-kafka test-integration-logstash test-integration-loki test-integration-mongodb test-integration-nats
test-integration: test-integration-nginx test-integration-opentelemetry test-integration-postgres test-integration-prometheus test-integration-pulsar
test-integration: test-integration-redis test-integration-splunk test-integration-dnstap test-integration-datadog-agent test-integration-datadog-logs
test-integration: test-integration-redis test-integration-splunk test-integration-dnstap test-integration-datadog-agent test-integration-datadog-logs test-integration-datadog-e2e-logs
test-integration: test-integration-datadog-traces test-integration-shutdown

test-integration-%-cleanup:
Expand Down
17 changes: 17 additions & 0 deletions scripts/e2e/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
This directory contains a set of end-to-end test frameworks for vector which are executed by the
`vdev` tool.

Currently these e2e tests are executed with the same `vdev` subcommand as the integration tests,
`cargo vdev integration`.

See the README in the `scripts/integration` subdirectory for more information.

A pending future enhancement is to create a `vdev` subcommand `e2e`, that will separate the
invocation of the end-to-end tests from the integration tests in `vdev`, to correspond to the
code separation and fundamental differences between the two classes of tests.

See https://github.com/vectordotdev/vector/issues/18829 for more information.

For now, any subdir here needs to be unique from the other integration tests outside this dir.
For example there is already a `datadog-logs` integration test, hence the e2e test is in a sub-
dir called `e2e-datadog-logs`.
100 changes: 100 additions & 0 deletions scripts/e2e/e2e-datadog-logs/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
version: '3'

services:
# Generates random log data for consumption by the custom Agent check
log_generator:
image: docker.io/mingrammer/flog
command:
- "-f"
- "json"
- "-n"
- "1000"
- "-t"
- "log"
- "-o"
- "/var/log/a_custom.log"
volumes:
- log_path:/var/log/

# Receives log data from the `datadog-agent-vector` service and sends
# to the `fakeintake-vector` service.
vector:
depends_on:
- log_generator
- fakeintake-vector
build:
context: ${PWD}
# re-using the integration test runner image since it already has
# compiled vector on it.
image: ${CONFIG_VECTOR_IMAGE}
environment:
- FEATURES=e2e-tests-datadog
working_dir: /home/vector
network_mode: host
command:
- "/usr/bin/vector"
- "-vvv"
- "-c"
- "/home/vector/tests/data/e2e/datadog/logs/vector.toml"
volumes:
- ${PWD}:/home/vector

# Tails a custom log created by `log_generator` and sends log data to
# the `fakeintake-agent` service
datadog-agent:
image: docker.io/datadog/agent:${CONFIG_AGENT_VERSION}
depends_on:
- log_generator
- fakeintake-agent
environment:
- DD_API_KEY=${TEST_DATADOG_API_KEY:?TEST_DATADOG_API_KEY required}
- DD_HOSTNAME=datadog-agent
- DD_ENABLE_PAYLOADS_EVENTS=false
- DD_ENABLE_PAYLOADS_SERVICE_CHECKS=false
- DD_CONTAINER_EXCLUDE="name:.*"
volumes:
# The Agent config file
- ${PWD}/tests/data/e2e/datadog/logs/agent_only.yaml:/etc/datadog-agent/datadog.yaml
# The custom logs check
- ${PWD}/tests/data/e2e/datadog/logs/logs.conf.d:/conf.d:ro
# The custom log to tail, created by the `log_generator` service
- log_path:/var/log/

# Tails a custom log created by `log_generator` and sends log data to
# the `vector` service
datadog-agent-vector:
image: docker.io/datadog/agent:${CONFIG_AGENT_VERSION}
depends_on:
- log_generator
- vector
environment:
- DD_API_KEY=${TEST_DATADOG_API_KEY:?TEST_DATADOG_API_KEY required}
- DD_HOSTNAME=datadog-agent-vector
- DD_ENABLE_PAYLOADS_EVENTS=false
- DD_ENABLE_PAYLOADS_SERVICE_CHECKS=false
- DD_CONTAINER_EXCLUDE="name:.*"
volumes:
# The Agent config file
- ${PWD}/tests/data/e2e/datadog/logs/agent_vector.yaml:/etc/datadog-agent/datadog.yaml
# The custom logs check
- ${PWD}/tests/data/e2e/datadog/logs/logs.conf.d:/conf.d:ro
# The custom log to tail, created by the `log_generator` service
- log_path:/var/log/

# Receives log data from the `datadog-agent` service. Is queried by the test runner
# which does the validation of consistency with the other fakeintake service.
fakeintake-agent:
image: docker.io/datadog/fakeintake:latest

# Receives log data from the `datadog-agent-vector` service. Is queried by the test runner
# which does the validation of consistency with the other fakeintake service.
fakeintake-vector:
image: docker.io/datadog/fakeintake:latest

networks:
default:
name: ${VECTOR_NETWORK}

volumes:
log_path: {}
target: {}
33 changes: 33 additions & 0 deletions scripts/e2e/e2e-datadog-logs/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
features:
- e2e-tests-datadog

test: "e2e"

test_filter: "datadog::logs::"

runner:
env:
EXPECTED_LOG_EVENTS: '1000'
VECTOR_RECEIVE_PORT: '8081'
FAKE_INTAKE_AGENT_ENDPOINT: 'http://fakeintake-agent:80'
FAKE_INTAKE_VECTOR_ENDPOINT: 'http://fakeintake-vector:80'

matrix:
# validate against the latest Agent nightly and also stable v6 and v7
agent_version: ['latest', '6', '7']


# changes to these files/paths will invoke the integration test in CI
# expressions are evaluated using https://github.com/micromatch/picomatch
paths:
- "src/common/datadog.rs"
- "src/sources/datadog_agent/**"
- "src/internal_events/datadog_*"
- "src/sinks/datadog/logs/**"
- "src/sinks/util/**"
# NOTE: currently we need the prefix 'e2e' even though it looks redundant,
# because the vdev code does not otherwise have a way to distinguish between
# the other `datadog-logs` int test.
# but once GH issue 18829 is completed, this will become unecessary.
- "scripts/e2e/e2e-datadog-logs/**"
neuronull marked this conversation as resolved.
Show resolved Hide resolved
- "tests/data/e2e/datadog/logs/**"
41 changes: 32 additions & 9 deletions scripts/integration/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,46 @@
ARG RUST_VERSION
FROM docker.io/rust:${RUST_VERSION}-slim-bookworm
ARG FEATURES
ARG DEBIAN_RELEASE=slim-bookworm

RUN apt-get update && apt-get install -y --no-install-recommends \
FROM docker.io/rust:${RUST_VERSION}-${DEBIAN_RELEASE}

RUN apt-get update && apt-get -y --no-install-recommends install \
build-essential \
cmake \
curl \
g++ \
libclang1 \
git \
clang \
libclang-dev \
libsasl2-dev \
libstdc++-11-dev \
libssl-dev \
llvm \
pkg-config \
zlib1g-dev \
libxxhash-dev \
unzip \
git \
&& rm -rf /var/lib/apt/lists/*
zlib1g-dev \
zlib1g

RUN git clone https://github.com/rui314/mold.git \
&& mkdir mold/build \
&& cd mold/build \
&& git checkout v2.0.0 \
&& ../install-build-deps.sh \
&& cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=c++ .. \
&& cmake --build . -j $(nproc) \
&& cmake --install .

RUN rustup run "${RUST_VERSION}" cargo install cargo-nextest --version 0.9.64 --locked

COPY scripts/environment/install-protoc.sh /
COPY tests/data/ca/certs /certs
RUN bash /install-protoc.sh

WORKDIR /vector
COPY . .
ARG FEATURES

RUN --mount=type=cache,target=/vector/target \
--mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/usr/local/cargo/git \
/usr/local/bin/mold -run cargo build --tests --lib --bin vector \
--no-default-features --features $FEATURES && \
cp target/debug/vector /usr/bin/vector
28 changes: 28 additions & 0 deletions tests/data/e2e/datadog/logs/agent_only.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
api_key: DEADBEEF
log_level: 'debug'

# disable bunch of stuff we don't need
inventories_configuration_enabled: false
enable_metadata_collection: false
enable_gohai: false

apm_config:
enabled: false

process_config:
container_collection:
enabled: false
process_discovery:
enabled: false
disable_realtime_checks: true

use_dogstatsd: false

# configure logs
logs_enabled: true

logs_config:
logs_dd_url: fakeintake-agent:80
logs_no_ssl: true
force_use_http: true
batch_wait: 1
33 changes: 33 additions & 0 deletions tests/data/e2e/datadog/logs/agent_vector.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
api_key: DEADBEEF
log_level: 'debug'

# disable bunch of stuff we don't need
inventories_configuration_enabled: false
enable_metadata_collection: false
enable_gohai: false

apm_config:
enabled: false

process_config:
container_collection:
enabled: false
process_discovery:
enabled: false
disable_realtime_checks: true

use_dogstatsd: false

# configure logs
logs_enabled: true

logs_config:
logs_no_ssl: true
force_use_http: true
batch_wait: 1

# send to vector
vector:
logs:
enabled: true
url: "http://vector:8181"
Loading
Loading