You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by mi...@apache.org on 2021/08/30 04:47:28 UTC
[incubator-shenyu] branch master updated: Change README in
shenyu-integrated-test (#1994)
This is an automated email from the ASF dual-hosted git repository.
midnight2104 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-shenyu.git
The following commit(s) were added to refs/heads/master by this push:
new df2cf8a Change README in shenyu-integrated-test (#1994)
df2cf8a is described below
commit df2cf8a5be5be8033d618af6a7375536797d0988
Author: Kunshuai Zhu <jo...@gmail.com>
AuthorDate: Sun Aug 29 23:47:20 2021 -0500
Change README in shenyu-integrated-test (#1994)
---
shenyu-integrated-test/README.md | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/shenyu-integrated-test/README.md b/shenyu-integrated-test/README.md
index 6086c4e..ac212df 100644
--- a/shenyu-integrated-test/README.md
+++ b/shenyu-integrated-test/README.md
@@ -4,8 +4,6 @@ There are two key points:
1. Using docker compose to build a test environment. We start MySQL, database, redis and other dependencies in docker;
2. Writing integrated tests under `shenyu-integrated-tests/src/test`.
-To support the integrated tests, we must prepare some data. So we update `shenyu-admin` `schema.sql` file.
-
## Quick start
**You must install Docker**!
@@ -44,13 +42,10 @@ docker-compose -f ./shenyu-integrated-test/shenyu-integrated-test-http/docker-co
That's the easy case!
You just need to do those steps:
-1. Prepare data. It means that you must insert some data into `shenyu-admin` database.
- So, you need to update `shenyu-integated-test-{plugin}/admin-config/schema.sql`
-
-2. (Optional) Update gateway configure. The configure file is under
+1. (Optional) Update gateway configure. The configure file is under
`shenyu-integated-test-{plugin}/src/main/resources/application-local.yml`
-3. Writing new test cases under `shenyu-integated-test-{plugin}/src/test`
+2. Writing new test cases under `shenyu-integated-test-{plugin}/src/test`.
### Writing integrated tests for new plugin
In this case, we didn't write tests for this plugin, so you need to setup the environment by yourself.
@@ -74,7 +69,10 @@ You could copy other plugins' `docker-compose` file. Update the image of example
#### Prepare data for integrated tests
-Update `admin-config/schema.sql` to prepare data
+Now, we can request related path in `PluginController` in `shenyu-web` to modify the configuration of shenyu gateway.
+You could extends `AbstractPluginDataInit` and call method in `AbstractPluginDataInit` to change the configuration in shenyu.
+
+However, pls remember to clean after class.
#### Writing tests
@@ -82,4 +80,4 @@ Writing tests under `shenyu-integated-test-{plugin}/src/test`. You must run test
#### Writing new github workflow
-You could copy other plugins' YAML file and then update the plugin name. And then you could make PR for us.
\ No newline at end of file
+You could copy other plugins' YAML file and then update the plugin name. And then you could make PR for us.