Skip to content

Commit 3b67a80

Browse files
docs: explain how to run tests locally (#17783)
<!-- **Your PR title must conform to the conventional commit spec!** <type>(<scope>)!: <description> * `type` = chore, enhancement, feat, fix, docs * `!` = OPTIONAL: signals a breaking change * `scope` = Optional when `type` is "chore" or "docs", available scopes https://github.com/vectordotdev/vector/blob/master/.github/semantic.yml#L20 * `description` = short description of the change Examples: * enhancement(file source): Add `sort` option to sort discovered files * feat(new source): Initial `statsd` source * fix(file source): Fix a bug discovering new files * chore(external docs): Clarify `batch_size` option --> This PR explains that we use`vdev` for testing and gives instructions for using vdev to run tests locally.
1 parent a2a3609 commit 3b67a80

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

CONTRIBUTING.md

+12
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Vector team member will find this document useful.
2424
- [Daily tests](#daily-tests)
2525
- [Flakey tests](#flakey-tests)
2626
- [Test harness](#test-harness)
27+
- [Running Tests Locally](#running-tests-locally)
2728
- [Deprecations](#deprecations)
2829
- [Dependencies](#dependencies)
2930
- [Next steps](#next-steps)
@@ -210,6 +211,17 @@ any pull request with:
210211
/test -t <name>
211212
```
212213

214+
### Running Tests Locally
215+
216+
To run tests locally, use [cargo vdev](https://github.com/vectordotdev/vector/blob/master/vdev/README.md).
217+
218+
Unit tests can be run by calling `cargo vdev test`.
219+
220+
Integration tests are not run by default when running
221+
`cargo vdev test`. Instead, they are accessible via the integration subcommand (example:
222+
`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.
223+
224+
213225
### Deprecations
214226

215227
When deprecating functionality in Vector, see [DEPRECATION.md](DEPRECATION.md).

vdev/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Table of Contents:
1111
- [Repository](#repository)
1212
- [Starship](#starship)
1313
- [CLI](#cli)
14+
- [Running Tests](#running-tests)
1415

1516
## Installation
1617

@@ -65,3 +66,10 @@ when = true
6566
The CLI uses [Clap](https://github.com/clap-rs/clap) with the `derive` construction mechanism and is stored in the [commands](src/commands) directory.
6667

6768
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.
69+
70+
71+
## Running Tests
72+
73+
Unit tests can be run by calling `cargo vdev test`.
74+
75+
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.

0 commit comments

Comments
 (0)