Skip to content

Commit 375849a

Browse files
committed
Introduction of DBGitTest
- Tests are made in integration manner and uses test\resources\repo directory to init DBGit repository into - Tests are oriented in Postgres DBMS and uses -pgTestDbUrl -pgTestDbUser -pgTestDbPass params from cmdline, but can be easily tweaked to use other DBMSs by changin parameters and specifying needed DBGit repository url with target DBMS - Uses JUnit 5 (junit-jupiter) to use improved annotations and 'tags' functionality, better commandline args support
1 parent ccead7c commit 375849a

File tree

4 files changed

+444
-9
lines changed

4 files changed

+444
-9
lines changed

pom.xml

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,22 @@
88
<packaging>jar</packaging>
99
<build>
1010
<plugins>
11+
12+
<plugin>
13+
<groupId>org.apache.maven.plugins</groupId>
14+
<artifactId>maven-surefire-plugin</artifactId>
15+
<version>3.0.0-M5</version>
16+
<configuration>
17+
<!-- <groups>none() | pgTest </groups>-->
18+
<!-- <excludedGroups>any()</excludedGroups>-->
19+
</configuration>
20+
</plugin>
21+
22+
<plugin>
23+
<artifactId>maven-failsafe-plugin</artifactId>
24+
<version>3.0.0-M5</version>
25+
</plugin>
26+
1127
<plugin>
1228
<!-- Build an executable JAR -->
1329
<groupId>org.apache.maven.plugins</groupId>
@@ -117,13 +133,6 @@
117133
</properties>
118134

119135
<dependencies>
120-
<!-- https://mvnrepository.com/artifact/junit/junit -->
121-
<dependency>
122-
<groupId>junit</groupId>
123-
<artifactId>junit</artifactId>
124-
<version>4.12</version>
125-
<scope>test</scope>
126-
</dependency>
127136

128137

129138
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
@@ -195,6 +204,23 @@
195204
<version>1.4</version>
196205
</dependency>
197206

207+
<!-- <dependency>-->
208+
<!-- <groupId>org.junit.platform</groupId>-->
209+
<!-- <artifactId>junit-platform-surefire-provider</artifactId>-->
210+
<!-- <version>1.3.2</version>-->
211+
<!-- </dependency>-->
212+
<!-- junit 5 engine -->
213+
<dependency>
214+
<groupId>org.junit.jupiter</groupId>
215+
<artifactId>junit-jupiter-engine</artifactId>
216+
<version>5.6.2</version>
217+
</dependency>
218+
219+
<dependency>
220+
<groupId>org.junit.jupiter</groupId>
221+
<artifactId>junit-jupiter-api</artifactId>
222+
<version>5.6.2</version>
223+
</dependency>
198224

199225
<!-- https://mvnrepository.com/artifact/org.postgresql/postgresql -->
200226
<dependency>
@@ -235,7 +261,7 @@
235261
<version>18.3.0.0</version>
236262
</dependency>
237263

238-
<dependency>
264+
<dependency>
239265
<groupId>com.microsoft.sqlserver</groupId>
240266
<artifactId>mssql-jdbc</artifactId>
241267
<version>7.0.0.jre8</version>

src/main/java/ru/fusionsoft/dbgit/core/DBGit.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ public void gitCheckout(String branch, String commit, boolean isNewBranch) throw
269269

270270
result = checkout.call();
271271

272-
ConsoleWriter.printlnGreen(result != null ? result.getName() : commit);
272+
// ConsoleWriter.printlnGreen(result != null ? result.getName() : commit);
273273
} else {
274274
MaskFilter maskAdd = new MaskFilter(branch);
275275

0 commit comments

Comments
 (0)