From 8390861de4d3a1176c58b34c69df7398d4a9a0ba Mon Sep 17 00:00:00 2001 From: Dominic Burkart Date: Wed, 28 Jun 2023 16:56:49 +0200 Subject: [PATCH 1/3] explain how to run tests locally --- CONTRIBUTING.md | 12 ++++++++++++ vdev/README.md | 8 ++++++++ 2 files changed, 20 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7f4a52ed229f9..4f5ff4b2a11bb 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` + + ### Deprecations When deprecating functionality in Vector, see [DEPRECATION.md](DEPRECATION.md). diff --git a/vdev/README.md b/vdev/README.md index 14e599e100cb7..dd7705aa77694 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`. From 63dba5f019b2118013d0ee55335bc07dac1326cb Mon Sep 17 00:00:00 2001 From: Dominic Burkart Date: Wed, 28 Jun 2023 17:24:00 +0200 Subject: [PATCH 2/3] indicate you need a containerized environment to run integration tests per https://github.com/vectordotdev/vector/pull/17783#discussion_r1245381551 --- vdev/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vdev/README.md b/vdev/README.md index dd7705aa77694..f0fcb808a9242 100644 --- a/vdev/README.md +++ b/vdev/README.md @@ -72,4 +72,4 @@ Every command group/namespace has its own directory with a `cli` module, includi 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 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. From 40671df8611c2c2bb01a700a852fc9ff99f8e5b3 Mon Sep 17 00:00:00 2001 From: Dominic Burkart Date: Wed, 28 Jun 2023 17:29:51 +0200 Subject: [PATCH 3/3] harmonize docs --- CONTRIBUTING.md | 2 +- vdev/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4f5ff4b2a11bb..c993c8de4dc1a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -219,7 +219,7 @@ 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` +`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 diff --git a/vdev/README.md b/vdev/README.md index f0fcb808a9242..88dc6c9bed54c 100644 --- a/vdev/README.md +++ b/vdev/README.md @@ -72,4 +72,4 @@ Every command group/namespace has its own directory with a `cli` module, includi 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. +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.