Skip to content

Commit

Permalink
Get started: update outdated command of running tests (#232)
Browse files Browse the repository at this point in the history
The 'gotest' makefile target was removed by pingcap/tidb#36530
due to issue pingcap/tidb#36493
  • Loading branch information
Octobug authored Jun 27, 2023
1 parent 1185464 commit 0a14ee2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/get-started/write-and-run-unit-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ When you write complex unit tests, you may take a look at what test kits we have

### Running all tests

You can always run all tests by executing the `gotest` target in Makefile:
You can always run all tests by executing the `ut` (stands for **unit test**) target in Makefile:

```
make gotest
```sh
make ut
```

This is almost equivalent to `go test ./...` but it enables and disables fail points before and after running tests.
Expand All @@ -139,9 +139,9 @@ This is almost equivalent to `go test ./...` but it enables and disables fail po

### Running a single test

To run a single test, you can manually repeat what `make gotest` does and narrow the scope in one test or one package:
To run a single test, you can manually repeat what `make ut` does and narrow the scope in one test or one package:

```
```sh
make failpoint-enable
cd domain
go test -v -run TestSchemaValidator # or with any other test flags
Expand All @@ -151,7 +151,7 @@ make failpoint-disable

or if it is an older test not using testify

```
```sh
make failpoint-enable
(cd planner/core ; go test -v -run "^TestT$" -check.f TestBinaryOpFunction )
make failpoint-disable
Expand Down Expand Up @@ -181,7 +181,7 @@ As shown above, you can run tests of the whole package, of a test, or of a file.
Before you merge a pull request, it must pass all tests.

Generally, continuous integration (CI) runs the tests for you; however, if you want to run tests with conditions or rerun tests on failure, you should know how to do that, the the rerun guide comment will be sent when the CI tests failed.
Generally, continuous integration (CI) runs the tests for you; however, if you want to run tests with conditions or rerun tests on failure, you should know how to do that, the rerun guide comment will be sent when the CI tests failed.

#### `/retest`

Expand Down

0 comments on commit 0a14ee2

Please sign in to comment.