https://github.com/tarscloud/tarsdemo
For test TARS framework automatically
https://github.com/tarscloud/tarsdemo
auto-test tars-foundation
Last synced: 11 months ago
JSON representation
For test TARS framework automatically
- Host: GitHub
- URL: https://github.com/tarscloud/tarsdemo
- Owner: TarsCloud
- License: bsd-3-clause
- Created: 2020-03-13T01:01:45.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-14T21:08:19.000Z (over 3 years ago)
- Last Synced: 2025-05-29T05:06:10.009Z (about 1 year ago)
- Topics: auto-test, tars-foundation
- Language: Python
- Homepage:
- Size: 147 MB
- Stars: 10
- Watchers: 4
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.en.md
- Contributing: Contributing.md
- License: LICENSE
Awesome Lists containing this project
README
[点我看中文版](README.md)
# TarsDemo
## Goal
Complete automatic testing of the framework(>=2.4.0)
## Basic Steps
- TARS Framework deployment
- Build docker: tarsnode operating environment of tars and operating environment of all languages
- Start docker
- docker run the script run-test.sh
- `run-test.sh` automatically completes the compilation of each language service, releases and runs, and calls tests
## docker run
- Run MySQL image
>- `docker pull mysql: 5.6`
>- Start mysql image
- Build and run the TARS image
>- `git clone https://github.com/TarsCloud/TarsDocker`
>- `./build-docker.sh framework development`
>- Build framework: `tarscloud/framework:dev`
>- Run image (note the setting UPLOAD = true)
- Build TarsDemo image
>- `git clone https://github.com/TarsCloud/TarsDemo`
>- `./build-docker.sh build developers`
>- Build demo image: `tarscloud / tarsdemo: dev`
>- Run automatic testing: `./build-docker.sh run dev WEB_HOST MYSQL_HOST`
The above logic is implemented in `autorun.sh`, and can be run directly:
## Current Progress
It is inconvenient to debug by building into docker, so you can instead debug in the following way:
- Run `autorun.sh` once. This will build a set of mysql, tarsframework
- In the docker where tarsdemo was built: `./build-docker.sh build dev`
- Run docker
```
docker run --rm \
--name node \
-e WEB_HOST=http://172.35.0.2:3000 \
-e MYSQL_HOST=172.35.0.200 \
--net=tarsdemo \
--ip 172.35.0.10 \
-p "22000-22020":"22000-22020" \
tarscloud/tarsdemo:dev \
/root/autotest/debug-entrypoint.sh
```
- At this point, the docker becomes a node of the tars environment
- Enter docker: `docker exec -it xxx bash`
- Enter the directory: `cd /root/autotest`
- Run run-test to debug:
`./run-test.sh 172.35.0.200 3306 root 12345 http://172.35.0.2:3000 172.35.0.10`