diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7f4a52ed229f9..c993c8de4dc1a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,6 +24,7 @@ Vector team member will find this document useful. - [Daily tests](#daily-tests) - [Flakey tests](#flakey-tests) - [Test harness](#test-harness) + - [Running Tests Locally](#running-tests-locally) - [Deprecations](#deprecations) - [Dependencies](#dependencies) - [Next steps](#next-steps) @@ -210,6 +211,17 @@ any pull request with: /test -t ``` +### Running Tests Locally + +To run tests locally, use [cargo vdev](https://github.com/vectordotdev/vector/blob/master/vdev/README.md). + +Unit tests can be run by calling `cargo vdev test`. + +Integration tests are not run by default when running +`cargo vdev test`. Instead, they are accessible via the integration subcommand (example: +`cargo vdev int test aws` runs aws-related integration tests). You can find the list of available integration tests using `cargo vdev int show`. Integration tests require docker or podman to run. + + ### Deprecations When deprecating functionality in Vector, see [DEPRECATION.md](DEPRECATION.md). diff --git a/vdev/README.md b/vdev/README.md index 14e599e100cb7..88dc6c9bed54c 100644 --- a/vdev/README.md +++ b/vdev/README.md @@ -11,6 +11,7 @@ Table of Contents: - [Repository](#repository) - [Starship](#starship) - [CLI](#cli) +- [Running Tests](#running-tests) ## Installation @@ -65,3 +66,10 @@ when = true The CLI uses [Clap](https://github.com/clap-rs/clap) with the `derive` construction mechanism and is stored in the [commands](src/commands) directory. Every command group/namespace has its own directory with a `cli` module, including the root `vdev` command group. All commands have an `exec` method that provides the actual implementation, which in the case of command groups will be calling sub-commands. + + +## Running Tests + +Unit tests can be run by calling `cargo vdev test`. + +Integration tests are not run by default when running`cargo vdev test`. Instead, they are accessible via the integration subcommand (example: `cargo vdev int test aws` runs aws-related integration tests). You can find the list of available integration tests using `cargo vdev int show`. Integration tests require docker or podman to run.