Commit 1bbac8c
Extract shared test fixtures into non-published module (#755)
* Initial plan
* Create dynamic-datasource-test-fixtures module for shared test code
- Add new module `dynamic-datasource-test-fixtures` with shared service classes
(UserService, StudentService, TeacherService, SchoolService, OrderService,
AccountService, ProductService) and model classes
- Move SQL scripts (add-remove-datasource.sql, ds-with-transactional.sql,
spring-expression-language.sql) to the shared module
- Configure the new module to NOT be published (disable all publishing tasks)
- Update all starter modules to depend on test-fixtures and use shared fixtures
- Keep UserController in each starter due to javax.servlet vs jakarta.servlet API differences
- Remove duplicate test fixture code from each starter module
Co-authored-by: huayanYu <16700837+huayanYu@users.noreply.github.com>
* Refactor: rename module from test-fixtures to test-common and remove fixture references
- Renamed module from dynamic-datasource-test-fixtures to dynamic-datasource-test-common
- Changed package from com.baomidou.dynamic.datasource.fixture to com.baomidou.dynamic.datasource.common
- Updated all imports and scanBasePackages in test classes
- Updated build.gradle comments to remove fixture terminology
Co-authored-by: huayanYu <16700837+huayanYu@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: huayanYu <16700837+huayanYu@users.noreply.github.com>1 parent 8bdd8f1 commit 1bbac8c
79 files changed
Lines changed: 118 additions & 1774 deletions
File tree
- dynamic-datasource-spring-boot-starter
- src/test/java/com/baomidou/dynamic/datasource
- common
- controller
- v1
- fixture/v1/service
- nest
- tx
- dynamic-datasource-spring-boot3-starter
- src/test
- java/com/baomidou/dynamic/datasource
- common
- controller
- v3
- fixture/v3/service
- nest
- spel
- tx
- resources
- META-INF/native-image/dynamic-datasource-spring-boot3-starter-test-metadata
- db
- dynamic-datasource-spring-boot4-starter
- src/test
- java/com/baomidou/dynamic/datasource
- common
- controller
- v4
- fixture/v4/service
- nest
- spel
- tx
- resources
- META-INF/native-image/dynamic-datasource-spring-boot3-starter-test-metadata
- db
- dynamic-datasource-test-common
- src/main
- java/com/baomidou/dynamic/datasource/common/service
- nest
- spel
- tx
- resources/db
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | | - | |
19 | | - | |
| 18 | + | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
| 21 | + | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| |||
Lines changed: 0 additions & 72 deletions
This file was deleted.
Lines changed: 0 additions & 74 deletions
This file was deleted.
Lines changed: 0 additions & 31 deletions
This file was deleted.
0 commit comments