-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #451 from ian4h/add-mysql-driver
Add mysql support by bundling the mysql driver
- Loading branch information
Showing
5 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/test/java/io/zeebe/monitor/repository/ZeebeApplicationMysqlTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package io.zeebe.monitor.repository; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.test.context.SpringBootTest; | ||
import org.springframework.test.context.ActiveProfiles; | ||
import org.springframework.test.context.ContextConfiguration; | ||
import org.springframework.test.context.support.AnnotationConfigContextLoader; | ||
import org.springframework.transaction.annotation.Transactional; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
@SpringBootTest | ||
@ContextConfiguration( | ||
classes = {TestContextJpaConfiguration.class}, | ||
loader = AnnotationConfigContextLoader.class) | ||
@Transactional | ||
@ActiveProfiles({"mysql-docker", "application-junittest.yaml"}) | ||
public class ZeebeApplicationMysqlTest { | ||
|
||
@Autowired | ||
private VariableRepository variableRepository; | ||
|
||
@Test | ||
void setup_of_mysql_should_work() { | ||
assertThat(variableRepository).isNotNull(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
spring: | ||
datasource: | ||
url: jdbc:tc:mysql:latest:///test | ||
username: test | ||
password: test | ||
jpa: | ||
properties: | ||
hibernate: | ||
dialect: org.hibernate.dialect.MySQL8Dialect | ||
naming: | ||
physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl | ||
hibernate: | ||
ddl-auto: create |