pingcap / tidb-lightning

This repository has been moved to https://github.com/pingcap/br
Apache License 2.0
142 stars 66 forks source link

Make it easier to run integration tests #512

Open kennytm opened 3 years ago

kennytm commented 3 years ago

Feature Request

Is your feature request related to a problem? Please describe:

Currently we need to manually prepare 6 programs to run the integration tests. There should be some way to simplify it.

Describe the feature you'd like:

  1. Change to use tiup to setup the TiDB cluster (thus replaces "tidb", "tikv", "pd" and "tiflash" dependency with a single dependency)
    • We'll likely use tiup playground since tiup cluster cannot reuse the existing binaries.
    • We need to detect when the tiup playground has started. Loop-checking tiup playground display should be fine (it returns when all components are started)
    • We also need to kill the playground. We can run tiup playground & and record the $!, then use kill -HUP $PID to finish them.
  2. Have some way to automatically download tikv-importer or skip all tikv-importer-related tests
  3. (Do something about minio?)
  4. Allow using non-TLS connections
  5. run_curl can use curl if wget cannot be executed (still prefer wget over curl due to Jenkins environment)
  6. Document in README how to run a single test against an existing tiup playground/cluster.

Describe alternatives you've considered:

Use UTF instead of tiup, but I suspect UTF is much much more difficult to setup than the current framework.

Teachability, Documentation, Adoption, Optimization:

Consider changing BR to use tiup too if this works here. We could even use scale-out and scale-in to configure TiFlash and CDC. But we may need some way to run 2 playgrounds simultaneously (or maybe just remove the br_tls test and always use TLS in all tests by default).