Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get started: update outdated command of running tests #232

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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