NOTE: This project has been moved in fluent/fluent-bit/tests/integration, so this repo is no longer active.
This suite is included under tests/fluent-bit-test-suite as an in-tree developer test harness.
It is intended for local development, plugin validation, and focused regression work.
It is not wired into the default Fluent Bit CMake test targets, ctest, or the default GitHub Actions workflows in this repository.
From the repository root:
cd tests/fluent-bit-test-suite
./setup-venv.sh
./run_tests.py --list
./run_tests.pyBy default the suite looks for build/bin/fluent-bit. You can override that with FLUENT_BIT_BINARY=/path/to/fluent-bit.
This is a binary-level integration test harness for Fluent Bit.
This project is distributed under the Apache License, Version 2.0.
It starts a real Fluent Bit process, drives real network traffic into it, captures what Fluent Bit emits, and asserts on observable behavior:
- listener behavior
- protocol negotiation
- payload parsing
- payload transformation
- downstream request generation
- exporter endpoint output
- negative-path handling
- memory diagnostics through optional Valgrind execution
The suite is designed as a reusable tool for testing Fluent Bit plugins and protocol behavior with deterministic local infrastructure.
This framework gives you a controlled environment for testing Fluent Bit end to end without depending on external services.
It provides:
- dynamic port allocation
- local fake HTTP servers
- local fake OTLP receivers over HTTP and gRPC
- TLS-enabled endpoints with reusable local certificates
- HTTP/1.1 and HTTP/2 matrix execution
- bounded waits instead of ad hoc sleeps
- per-run logs and result directories
- optional Valgrind wrapping and parsing
That makes it useful both for plugin development and for runtime regression testing.
+----------------------+
| Python test case |
| (pytest) |
+----------+-----------+
|
v
+----------------------+
| FluentBitTestService |
| port/env orchestration
| server lifecycle
| bounded waits
+----------+-----------+
|
v
+----------------------+
| FluentBitManager |
| start/stop binary
| logs/results
| readiness
| valgrind integration
+----------+-----------+
|
v
+----------------------+
| fluent-bit binary |
+-----+----------+-----+
| |
input side | | output side
v v
real clients/tests fake receivers/exporters
src/utils/fluent_bit_manager.py
- resolves the Fluent Bit binary
- starts Fluent Bit with a scenario config
- captures logs in a per-run results directory
- exposes monitoring-based readiness checks
- supports
VALGRIND=1
- allocates dynamic ports
- injects environment variables into scenario configs
- starts and stops helper servers
- exposes deterministic wait helpers for assertions
- drives HTTP/1.1 cleartext
- drives HTTP/2 cleartext
- drives HTTP/1.1 over TLS
- drives HTTP/2 over TLS
- exercises upgrade and fallback behavior when relevant
- fake HTTP destination
- captures request headers, body, path, auth, and metadata
- can inject response codes, delays, OAuth token responses, and JWKS responses
- fake OTLP receiver
- accepts OTLP over HTTP and gRPC
- decodes protobuf payloads
- supports gzip and zstd request decoding
- captures method/path/headers/transport for assertions
- Splunk-oriented downstream capture helper
- Forward protocol receiver for end-to-end input and output validation
- captures message mode and packed-forward payloads, chunk metadata, and signal options
- minimal Kafka-compatible server for output plugin validation
- captures produced records, keys, topics, and payload encodings
- fake S3-compatible HTTP receiver for
out_s3 - captures PUT requests, object paths, headers, and uploaded payloads
test client
|
| real protocol payload
v
+------------------+
| Fluent Bit |
| input plugin |
+------------------+
|
| forwarded output
v
+------------------+
| fake receiver |
| http / otlp |
+------------------+
|
v
pytest assertions
Examples:
in_httpin_splunkin_elasticsearchin_opentelemetryin_syslog
source input inside Fluent Bit
dummy / metrics / otlp / etc
|
v
+------------------+
| Fluent Bit |
| output plugin |
+------------------+
|
| outbound request
v
+------------------+
| fake receiver |
| http / otlp |
+------------------+
|
v
pytest assertions
Examples:
out_httpout_opentelemetryout_prometheus_exporterout_vivo_exporter
pytest client
|
v
+------------------+
| Fluent Bit |
| internal server |
+------------------+
|
v
response validation
Examples:
internal_http_serverout_prometheus_exporterout_vivo_exporter
The suite reuses a local certificate pair from:
These assets are shared across HTTP and OTLP TLS scenarios.
The HTTP matrix covers, depending on plugin support:
- HTTP/1.1 cleartext
- HTTP/2 cleartext with prior knowledge
- cleartext upgrade attempts
- fallback to HTTP/1.1
- HTTP/1.1 over TLS
- HTTP/2 over TLS via ALPN
- HTTP/2 TLS fallback to HTTP/1.1
This lets the suite validate not only payload handling, but also the transport behavior exposed by Fluent Bit listeners and endpoints.
The suite currently exercises:
- HTTP input plugins
- Forward input behavior
- MQTT input behavior
- OTLP input and output paths
- Splunk HEC input behavior
- Elasticsearch-compatible input behavior
- syslog ingestion over TCP, TLS, UDP, and Unix sockets
- Prometheus remote write ingestion
- Kafka output behavior
- S3 output behavior
- stdout output behavior
- Azure Logs Ingestion output behavior
- Prometheus and Vivo exporters
- internal HTTP server endpoints
- connection limiting behavior
- OAuth2 and JWT flows for supported plugins
- compression with gzip and zstd
- selected end-to-end plugin-to-plugin behavior
Path: scenarios/in_http
Entry point: scenarios/in_http/tests/test_in_http_001.py
Covers:
- request acceptance and downstream forwarding
- HTTP transport matrix
- malformed JSON rejection
- invalid method rejection
- JWT/OAuth2 protected input behavior
Path: scenarios/in_elasticsearch
Entry point: scenarios/in_elasticsearch/tests/test_in_elasticsearch_001.py
Covers:
- root and
/_nodes/httpendpoints - bulk create, update, and delete operations
- HTTP transport matrix
- worker and small-buffer variants
- invalid bulk request handling
Path: scenarios/in_forward
Entry point: scenarios/in_forward/tests/test_in_forward_001.py
Covers:
- forward message mode and packed-forward mode
- gzip and zstd packed-forward payloads
- chunk acknowledgements and metadata
- tag rewriting and forced-tag behavior
- Unix socket transport
- TLS and secure-forward authentication
- end-to-end forwarding into a local forward receiver
- storage-limit behavior where supported by the current binary
Path: scenarios/in_opentelemetry
Entry point: scenarios/in_opentelemetry/tests/test_in_opentelemetry_001.py
Covers:
- OTLP logs, metrics, and traces ingestion
- semantic validation of re-emitted OTLP
- histogram and gauge metrics
- parent/child traces
- invalid payload handling
- receiver error visibility
- HTTP transport matrix
Path: scenarios/in_splunk
Entry point: scenarios/in_splunk/tests/test_in_splunk_001.py
Covers:
- Splunk HEC URI variants
- HTTP transport matrix
- keepalive variations
- invalid request handling
- output-token precedence in
in_splunk -> out_splunk
Path: scenarios/in_prometheus_remote_write
Entry point: scenarios/in_prometheus_remote_write/tests/test_in_prometheus_remote_write_001.py
Covers:
- remote-write ingestion using a real Fluent Bit sender
- HTTP/1 and HTTP/2 receiver modes
- cleartext and TLS receiver modes
Path: scenarios/in_http_max_connections
Entry point: scenarios/in_http_max_connections/tests/test_in_http_max_connections_001.py
Covers:
http_server.max_connections- deterministic block and recovery behavior
Path: scenarios/in_mqtt
Entry point: scenarios/in_mqtt/tests/test_in_mqtt_001.py
Covers:
- valid MQTT publish ingestion
- truncated and malformed publish recovery
- invalid topic-length handling
- payload wrapping via
payload_key
Path: scenarios/in_syslog
Entry point: scenarios/in_syslog/tests/test_in_syslog_001.py
Covers:
- TCP plaintext
- TCP TLS
- UDP plaintext
- Unix stream sockets
- Unix datagram sockets
Path: scenarios/internal_http_server
Entry point: scenarios/internal_http_server/tests/test_internal_http_server_001.py
Covers:
- representative internal endpoints
- response headers
- concurrency behavior
- selected HTTP/2 access
Path: scenarios/out_http
Entry point: scenarios/out_http/tests/test_out_http_001.py
Covers:
- outbound JSON delivery
- receiver error observability
- OAuth2 client credentials
- OAuth2 private key JWT
Path: scenarios/out_azure_logs_ingestion
Entry point: scenarios/out_azure_logs_ingestion/tests/test_out_azure_logs_ingestion_001.py
Covers:
- Azure Logs Ingestion delivery with OAuth2
- token and data-plane request validation
Path: scenarios/out_kafka
Entry point: scenarios/out_kafka/tests/test_out_kafka_001.py
Covers:
- JSON, raw, and msgpack output
- dynamic topic routing
- message-key mapping
- OTLP JSON and OTLP protobuf output for logs, metrics, and traces
- multi-resource preservation checks
Path: scenarios/out_opentelemetry
Entry point: scenarios/out_opentelemetry/tests/test_out_opentelemetry_001.py
Covers:
- OTLP logs, metrics, and traces output
- HTTP and gRPC transport
- custom HTTP and gRPC URIs
- OAuth2 client credentials
- OAuth2 private key JWT
- TLS verification and vhost/SNI behavior
- custom headers and basic auth
- gzip and zstd compression
logs_body_keylogs_body_key_attributes- metadata and message key mapping
add_labelbatch_sizelogs_max_resourceslogs_max_scopes
Path: scenarios/out_prometheus_exporter
Entry point: scenarios/out_prometheus_exporter/tests/test_out_prometheus_exporter_001.py
Covers:
- scrapeable
/metrics - selected HTTP/2 access
Path: scenarios/out_s3
Entry point: scenarios/out_s3/tests/test_out_s3_001.py
Covers:
use_put_objectuploads- JSON-lines payload delivery
- gzip-compressed uploads
- newer S3 output formats when supported by the current binary
Path: scenarios/out_stdout
Entry point: scenarios/out_stdout/tests/test_out_stdout_001.py
Covers:
- default stdout formatting
- JSON-lines formatting
- metrics and traces text output
- OTLP JSON ingestion paths rendered to stdout
Path: scenarios/out_vivo_exporter
Entry point: scenarios/out_vivo_exporter/tests/test_out_vivo_exporter_001.py
Covers:
- exporter endpoints
- headers
- selected HTTP/2 access
Run the full suite with the wrapper:
./tests/fluent-bit-test-suite/run_tests.pyRun the full suite with raw pytest:
./tests/fluent-bit-test-suite/.venv/bin/pytest -q tests/fluent-bit-test-suiteList tests with the local wrapper:
./tests/fluent-bit-test-suite/run_tests.py --listRun tests with a simple checkbox progress view:
./tests/fluent-bit-test-suite/run_tests.pyRun a subset:
./tests/fluent-bit-test-suite/run_tests.py scenarios/in_opentelemetry -k oauth2Run against a different binary:
FLUENT_BIT_BINARY=/path/to/fluent-bit \
./tests/fluent-bit-test-suite/.venv/bin/pytest -q tests/fluent-bit-test-suiteRun under Valgrind:
VALGRIND=1 ./tests/fluent-bit-test-suite/.venv/bin/pytest -q tests/fluent-bit-test-suiteRequire Valgrind-clean runs:
VALGRIND=1 VALGRIND_STRICT=1 \
./tests/fluent-bit-test-suite/.venv/bin/pytest -q tests/fluent-bit-test-suite