Documentation ¶
Overview ¶
Rewriter will take one or more existing Go test files on the command-line and rewrite "goconvey" tests in them to use go.chromium.org/luci/common/testing/ftt.
This makes the following changes:
- Converts all Convey function calls to ftt.Run calls. This will also rewrite the callback from `func() {...}` to `func(t *ftt.Test) {...}`. If the test already had an explicit context variable (e.g. `func(c C)`), this will preserve that name.
- Removes dot-imported convey.
- Adds imports for go.chromium.org/luci/testing/common/truth/assert and go.chromium.org/luci/testing/common/truth/should.
- Rewrites So and SoMsg calls.
Note that 'fancy' uses of Convey/So will likely be missed by this tool, and will require hand editing... however this does complete successfully for all code in luci-go, infra and infra_internal at the time of writing.
Directories ¶
Path | Synopsis |
---|---|
Package rewriteimpl will take one or more existing Go test files on the command-line and rewrite "goconvey" tests in them to use go.chromium.org/luci/common/testing/ftt.
|
Package rewriteimpl will take one or more existing Go test files on the command-line and rewrite "goconvey" tests in them to use go.chromium.org/luci/common/testing/ftt. |
testinputs
Package testinputs is a valid Go package which contains test files (and only test files) using a variety of testing functionality.
|
Package testinputs is a valid Go package which contains test files (and only test files) using a variety of testing functionality. |
Click to show internal directories.
Click to hide internal directories.