integration-tests

command
v0.39.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

README

Integration tests

This document provides an outline of how to run and add new integration tests to the project.

The purpose of these tests is to verify simple, happy-path pipelines to catch issues between the agent and external dependencies.

The external dependencies are launched as Docker containers.

Running tests

Execute the integration tests using the following command:

go run .

Flags
  • --skip-build: Run the integration tests without building the agent (default: false)
  • --test: Specifies a particular directory within the tests directory to run (default: runs all tests)

Adding new tests

Follow these steps to add a new integration test to the project:

  1. If the test requires external resources, define them as Docker images within the docker-compose.yaml file.
  2. Create a new directory under the tests directory to house the files for the new test.
  3. Within the new test directory, create a file named config.river to hold the pipeline configuration you want to test.
  4. Create a _test.go file within the new test directory. This file should contain the Go code necessary to run the test and verify the data processing through the pipeline.

NOTE: The tests run concurrently. Each agent must tag its data with a label that corresponds to its specific configuration. This ensures the correct data verification during the Go testing process.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
configs

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL