File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
test/java/com/answerdigital/answerking/utility Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,9 @@ spring:
4646 password : GS3ef_fsd^!
4747 url : jdbc:mysql://localhost:3306/answer_king_test
4848 name : answer_king_test
49+ sql :
50+ init :
51+ mode : never
4952
5053---
5154spring :
Original file line number Diff line number Diff line change 77
88@ ActiveProfiles ("test" )
99public abstract class AbstractContainerBaseTest {
10- static final MySQLContainer MY_SQL_CONTAINER ;
10+ static final MySQLContainer MYSQL_CONTAINER ;
1111
1212 static {
13- MY_SQL_CONTAINER =
13+ MYSQL_CONTAINER =
1414 new MySQLContainer <>("mysql:8.0.31" )
1515 .withInitScript ("init_db.sql" )
1616 .withReuse (true );
17- MY_SQL_CONTAINER .start ();
17+ MYSQL_CONTAINER .start ();
1818 }
1919
2020 @ DynamicPropertySource
2121 private static void overrideProps (DynamicPropertyRegistry registry ) {
22- registry .add ("spring.datasource.url" , MY_SQL_CONTAINER ::getJdbcUrl );
23- registry .add ("spring.datasource.username" , MY_SQL_CONTAINER ::getUsername );
24- registry .add ("spring.datasource.password" , MY_SQL_CONTAINER ::getPassword );
25- registry .add ("spring.datasource.name" , MY_SQL_CONTAINER ::getDatabaseName );
22+ registry .add ("spring.datasource.url" , MYSQL_CONTAINER ::getJdbcUrl );
23+ registry .add ("spring.datasource.username" , MYSQL_CONTAINER ::getUsername );
24+ registry .add ("spring.datasource.password" , MYSQL_CONTAINER ::getPassword );
25+ registry .add ("spring.datasource.name" , MYSQL_CONTAINER ::getDatabaseName );
2626 }
2727}
You can’t perform that action at this time.
0 commit comments