Skip to content

Commit

Permalink
update readme.md in tests
Browse files Browse the repository at this point in the history
Signed-off-by: Ping Yu <[email protected]>
  • Loading branch information
pingyu committed Jan 5, 2024
1 parent 13a140a commit 85f2041
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions cdc/tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ The following programs must be installed:

* [docker](https://docs.docker.com/get-docker/)
* [docker-compose](https://docs.docker.com/compose/install/)
* [BuildKit](https://docs.docker.com/build/buildkit/#getting-started) (for integration tests with Kafka sink)

We recommend that you provide docker with at least 6+ cores and 8G+ memory. Of course, the more resources, the better.

Expand All @@ -39,7 +40,7 @@ We recommend that you provide docker with at least 6+ cores and 8G+ memory. Of c

### Integration Test

#### Run integration tests locally
#### Run Integration Tests Locally

1. Run `make integration_test` to execute the integration tests. This command will

Expand All @@ -52,21 +53,25 @@ We recommend that you provide docker with at least 6+ cores and 8G+ memory. Of c
>
> There are some environment variables that you can set by yourself, see [test_prepare](./integration_tests/_utils/test_prepare).
#### Run integration tests in docker
#### Run Integration Tests in Docker for TiKV Sink

1. Run `tests/up.sh`. This script will setup a container with some tools ready, and run `/bin/bash` interactively in the container.

2. Run `make integration_test` or `make integration_test CASE=[test name]` to execute the integration tests.
2. Run `make integration_test` or `make integration_test CASE=[test names]` to execute the integration tests.

> **Warning:**
> These scripts and files may not work under the arm architecture,
> and we have not tested against it.
Some useful tips:

- You can specify multiple tests to run in CASE, for example: `CASE="cli cli_tls"`. You can even
* You can specify multiple tests to run in CASE, for example: `CASE="cli cli_tls"`. You can even
use `CASE="*"` to indicate that you are running all tests。

#### Run Integration Tests in Docker for Kafka Sink

1. Run `tests/integration_tests/run_kafka_in_docker.sh --case [test names]`. The rule of `test name` is the same with above.

## Writing new tests

1. Write new integration tests as shell scripts in `tests/integration_tests/TEST_NAME/run.sh`. The script should
Expand Down
2 changes: 1 addition & 1 deletion cdc/tests/integration_tests/run_group.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)

if [[ $# -eq 1 ]]; then
# TODO: remove this branch when CI pipeline is updated.
sink_type=kafka
sink_type=tikv
group=$1
elif [[ $# -eq 2 ]]; then
sink_type=$1
Expand Down

0 comments on commit 85f2041

Please sign in to comment.