Skip to content

Commit 87b6710

Browse files
committed
Merge branch 'develop'
# Conflicts: # README.md
2 parents adbb375 + c2f33ad commit 87b6710

File tree

17 files changed

+365
-12
lines changed

17 files changed

+365
-12
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
services:
1717
oracle:
18-
image: gvenzl/oracle-xe:18.4.0-slim
18+
image: gvenzl/oracle-xe:21-slim
1919
env:
2020
ORACLE_PASSWORD: oracle
2121
ports:

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111

1212
services:
1313
oracle:
14-
image: gvenzl/oracle-xe:18.4.0-slim
14+
image: gvenzl/oracle-xe:21-slim
1515
env:
1616
ORACLE_PASSWORD: oracle
1717
ports:

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ Please refer to the following usage example for the parameters descriptions:
100100
<!-- REQUIRED PARAMETERS -->
101101

102102
<!-- A list of tests suite paths. -->
103+
103104
<!-- The path(s) can be in one of the following formats: -->
104105
<!-- schema[.package[.procedure]] -->
105106
<!-- schema:suite[.suite[.suite][...]][.procedure] -->

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>org.utplsql</groupId>
77
<artifactId>utplsql-maven-plugin</artifactId>
8-
<version>3.1.6</version>
8+
<version>3.1.7</version>
99
<packaging>maven-plugin</packaging>
1010

1111
<name>utPLSQL Maven Plugin</name>

scripts/0_start_db.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
docker run -d --name ora-utplsql -p 1521:1521 -e ORACLE_PASSWORD=oracle gvenzl/oracle-xe:18.4.0-slim
1+
docker run -d --name ora-utplsql -p 1521:1521 -e ORACLE_PASSWORD=oracle gvenzl/oracle-xe:21-slim

src/main/java/org/utplsql/maven/plugin/UtPlsqlMojo.java

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import java.sql.Connection;
3131
import java.sql.SQLException;
3232
import java.util.ArrayList;
33+
import java.util.Arrays;
3334
import java.util.Collections;
3435
import java.util.LinkedHashSet;
3536
import java.util.List;
@@ -162,10 +163,21 @@ public void execute() throws MojoExecutionException {
162163
.failOnErrors(!ignoreFailure);
163164

164165
if (isNotBlank(excludeObject)) {
165-
runner.excludeObject(excludeObject);
166+
if (excludeObject.contains(",")) {
167+
String[] excludes = excludeObject.split(",");
168+
runner.excludeObjects(Arrays.asList(excludes));
169+
} else {
170+
runner.excludeObject(excludeObject);
171+
}
172+
166173
}
167174
if (isNotBlank(includeObject)) {
168-
runner.includeObject(includeObject);
175+
if (includeObject.contains(",")) {
176+
String[] includes = includeObject.split(",");
177+
runner.excludeObjects(Arrays.asList(includes));
178+
} else {
179+
runner.excludeObject(includeObject);
180+
}
169181
}
170182

171183
runner.run(connection);

src/test/java/org/utplsql/maven/plugin/UtPlsqlMojoIT.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,11 @@ void type_mapping(MavenExecutionResult result) {
6161

6262
assertThatReportsAreGeneratedAsExpected(result, "sonar-test-report.xml", "coverage-sonar-report.xml");
6363
}
64+
65+
@MavenTest
66+
void exclude_object(MavenExecutionResult result) {
67+
assertThat(result).isSuccessful();
68+
69+
assertThatReportsAreGeneratedAsExpected(result, "sonar-test-report.xml", "coverage-sonar-report.xml");
70+
}
6471
}

src/test/java/org/utplsql/maven/plugin/UtPlsqlMojoTest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -313,14 +313,13 @@ public void db_config_using_system_properties() throws Exception {
313313
* Then : System Properties must be used to configure database
314314
*/
315315
@Test
316-
public void include_and_exclude_objects() throws Exception {
317-
UtPlsqlMojo utPlsqlMojo = createUtPlsqlMojo("include_and_exclude_objects");
316+
public void exclude_object() throws Exception {
317+
UtPlsqlMojo utPlsqlMojo = createUtPlsqlMojo("exclude_object");
318318
assertNotNull(utPlsqlMojo);
319319

320320
utPlsqlMojo.execute();
321321

322-
assertEquals("abc", utPlsqlMojo.includeObject);
323-
assertEquals("xyz", utPlsqlMojo.excludeObject);
322+
assertEquals("app.pkg_test_me,app.test_pkg_test_me", utPlsqlMojo.excludeObject);
324323
}
325324

326325
private UtPlsqlMojo createUtPlsqlMojo(String directory) throws Exception {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<coverage version="1">
2+
</coverage>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<testExecutions version="1">
2+
<file path="plsql.examples.test_pkg_test_me">
3+
<testCase name="test_fc_input_1" duration="1" ></testCase>
4+
<testCase name="test_fc_input_0" duration="1" ></testCase>
5+
<testCase name="test_fc_input_null" duration="1" ></testCase>
6+
<testCase name="test_pr_test_me_null" duration="1" ></testCase>
7+
<testCase name="test_pr_test_me_not_null" duration="1" ></testCase>
8+
<testCase name="test_pr_test_me_exists" duration="1" ></testCase>
9+
<testCase name="test_pr_test_me_cursor" duration="1" ></testCase>
10+
</file>
11+
</testExecutions>

0 commit comments

Comments
 (0)