Documentation
¶
Overview ¶
Package grpctest implements testing helpers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpectError ¶ added in v1.75.0
func ExpectError(expr string)
ExpectError declares an error to be expected. For the next test, the first error log matching the expression (using FindString) will not cause the test to fail. "For the next test" includes all the time until the next call to Update(). Note that if an expected error is not encountered, this will cause the test to fail.
func ExpectErrorN ¶ added in v1.75.0
ExpectErrorN declares an error to be expected n times.
func RunSubTests ¶
RunSubTests runs all "Test___" functions that are methods of x as subtests of the current test. Setup is run before the test function and Teardown is run after.
For example usage, see example_test.go. Run it using:
$ go test -v -run TestExample .
To run a specific test/subtest:
$ go test -v -run 'TestExample/^Something$' .