2
0
Fork 0
mirror of https://github.com/bazel-contrib/bazel-lib synced 2024-11-27 17:43:27 +00:00
bazel-lib/docs/testing.md
Alex Eagle 896ee0c1f0 chore: set test timeouts to short
I recently enabled --test_verbose_timeout_warnings and that caused a bunch of warnings in our build.
This fixes it, and adds a utility for us or others to make test-wrapping macros that set to short by default.
2022-08-20 13:58:43 -07:00

1.1 KiB
Executable file
Generated

Helpers for making test assertions

assert_contains

assert_contains(name, actual, expected, size, timeout)

Generates a test target which fails if the file doesn't contain the string.

Depends on bash, as it creates an sh_test target.

PARAMETERS

Name Description Default Value
name target to create none
actual Label of a file none
expected a string which should appear in the file none
size the size attribute of the test target None
timeout the timeout attribute of the test target None